Page 1 of 1

Seconds to HH:MM:SS

Posted: Wed Oct 21, 2015 11:39 am
by sam334
All,
Do we have any functions to convert seconds to HH:MM:SS format. I generally do it in database itself. This time looking for something in Datastage. Can we do it without Routines.

Seconds- 100
HH:MM:SS-00:01:40

Seconds- 10410
HH:MM:SS- 02:53:30

Thanks..

Posted: Wed Oct 21, 2015 12:16 pm
by rkashyap
TimeOffsetBySeconds parallel transform function converts seconds to HH:MM:SS format, provided basetime is set to midnight.

Code: Select all

TimeOffsetBySeconds("00:00:00", second_offset)

e.g. TimeOffsetBySeconds("00:00:00", 10410) = 02:53:30

Posted: Wed Oct 21, 2015 12:44 pm
by qt_ky
TimeFromMidnightSeconds
Returns the time given the number of seconds since midnight.

Note: All the built in functions are fairly well documented in the product guides and online help.

Posted: Wed Oct 21, 2015 1:11 pm
by sam334
Thanks a lot. I was checking parallel dev guide.Seems like missed that part. Thanks again.