How to represent the number of seconds as hours, minutes and seconds

Let’s say you have a field [Event Duration] that shows duration of some event in seconds, and, instead of displaying it as, say, 5,000 sec, you want to format it in hours/minutes/seconds, as 1 hr 23 min 20 sec


Step 1: Create a date field: DateAdd(“second”, [Event Duration], Date(“1970-01-01”))

Step 2. Set the formatting for this field as a custom format: %H:%M:%S

1 Like

You can also use DateAdd(“second”, [Event Duration], Date(0)) in Step 1 for the same effect. This might make it clearer what it’s doing, starting the Date value at 0 - which happens to be equivalent to “1970-01-01” due to the way dates are stored as numbers.

1 Like