How can I display a decimal number in hh:mm:ss format?

Knowledge Drop

Last Tested: Jan 21, 2019
 

If your value is a number of seconds, divide the number by 86400.0 (the number of seconds in a day) and then use the value format hh:mm:ss.

NOTE that this is like a time, and will show you the 24-hour time modded by day. So if you had 25 hours, it would show 01:00:00 rather than 25:00:00. You can use the day modifier dd:hh:mm:ss to include days, or use sql as described in this community post.

Table calcs can get at this too - where my_time_difference is in seconds:

concat (

floor(${my_time_difference}/(60*60)),

" hours, ",

floor(mod(${my_time_difference},(60*60))/(60)),

" minutes, ",

mod(${my_time_difference},(60)),

" seconds."

)

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 03:32 PM
Updated by: