Seconds to HH:MM:SS

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Seconds to HH:MM:SS

Post 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..
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post 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
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post 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.
Choose a job you love, and you will never have to work a day in your life. - Confucius
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Thanks a lot. I was checking parallel dev guide.Seems like missed that part. Thanks again.
Post Reply