Convert TimeStamp

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ram1899
Charter Member
Charter Member
Posts: 41
Joined: Wed Aug 04, 2004 11:46 am

Convert TimeStamp

Post by ram1899 »

I have Input file which has a TimeStamp Column , All the values are in ET timezone I want to convert this time stamp to diffrent time zone based on the Local Time Zone Column

My Data in file is

Time in 24 Hrs Clock

Customer Customer_timezone TimeStamp ET
123A ET 2008-04-09 10:20:23
124B CT 2008-04-09 00:10:42
126x PT 2008-04-09 01:30:30

When I convert this timestamp into local time I need output as
123A ET 2008-04-09 10:20:23
124B CT 2008-04-08 23:10:42
126x PT 2008-04-08 10:30:30


Any help on this will be greatly appreciated


Thank you in Advance
ram1899
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You're going to need a user written function to add time to a timestamp. Then, you'll just need to pass as arguments to the functions a timestamp and the offset needed.

Your difficulty is dealing with daylight savings time. Even if your timestamp is under daylight savings time, you may have to handle that converting the timezome may run into the odd-handling of that time shift.

Yeah, we hate Benjamin Franklin for this too.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This is one you will need to write yourself. What exactly is in the time zone column?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply