Home Discussions Questions & Answers XXEN_UTIL Function for Time Conversion

XXEN_UTIL Function for Time Conversion

Avatar photoCustomer September 4, 2021 at 7:19 am

I have an output column representing duration in total seconds. Is there an `XXEN_UTIL` function that converts this number into a human-readable format like days, hours, and minutes?

Viewing 4 reply threads
  • Author
    Replies
    • Support September 5, 2021 at 4:08 am  

      Yes, you should use the function **`XXEN_UTIL.TIME(p_seconds in number)`**. It takes a number of seconds as input.

    • Avatar photoCustomer September 5, 2021 at 2:00 pm  

      What is the format of the resulting string?

    • Support September 6, 2021 at 10:53 am  

      The result is a string showing the number of days, hours, minutes, and seconds, formatted as, for example, ‘4d 4h 16m 52s’.

    • Avatar photoCustomer September 7, 2021 at 9:29 pm  

      If I input 3600 seconds, what would the result be?

    • Support September 8, 2021 at 11:11 pm  

      The SQL statement `select xxen_util.time(3600) from dual` would return ‘1h 0m 0s’.

Viewing 4 reply threads
  • You must be logged in to reply to this post.

Login with: