Hi All
Does anyone have a slick method of converting second to a time string on the format of h:mm:ss?
My source provides the time in seconds since midnight e.g:
21600 converts to 6:00:00
54060 converts to 15:01:00
84600 converts to 23:30:00
I know I can write a custom routine, however I was wondering if there is an easier way?
Thanks
Adamski
Seconds to Time String Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That's about it, though you might like to format the result. For example do you need no leading zeroes on the hour component?
Code: Select all
Oconv(InLink.Seconds, "MTS[Z,2,2]")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.