If the number of seconds does NOT exceed the number of second in a day. You
can use the DateAdd function.
DateAdd("s",[YourSecondsValue],0)
If you need the specific format, then apply the format against the value
returned by the above.
If the value exceeds 24 hours (86,400 seconds) then you will have to use
some math and string functions
[YourSecondsValue] Mod 60 returns the number of seconds
[YourSecondsValue]\3600 returns the number of hours
([YourSecondsValue] \60) Mod 60 returns the number of minutes
So you can combine those into one expression as
[YourSecondsValue]\3600 & ":" & Format(([YourSecondsValue] \60) Mod 60,"00")
& ":" & Format(YourSecondsValue] Mod 60,"00")
Paul Dennis said:
I have a calculation that brings back a number which represents seconds. I
would like to convert that to hours / minutes / seconds, i.e. hh:nn:ss. If
I
just apply the format it returns 00:00:00.
Any ideas?