UTC to AEST

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
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

UTC to AEST

Post by SURA »

Hello All

Source : File
Target : Table
UTC Time: Timestamp (yyyy-mm-dd hh:mm:ss)

I have a reference table where i can get the offset numbers such as 11 or 10 based on the range lookup with the source data.

Is there any inbuilt Datastage function i could use to add the offset numbers with the input time stamp to get the AEST ?

Any suggestion ?
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is no such built-in function. For a small number of rows, where performance isn't a big issue, you could make a call to any of the web services out there that can effect this conversion.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

AEST as in Australian Eastern Standard Time? And you are already looking up a number of hours you need to add to the timestamp?

DateOffsetByComponents()
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Thanks Ray
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Thanks chulett.

Yes it is.

I will check this.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, the fact that I copied the wrong function name as you're obviously not dealing with a date. :wink:

Oddly enough, the correct one would be:

TimestampOffsetByComponents()
-craig

"You can never have too many knives" -- Logan Nine Fingers
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

It worked perfectly.

Thanks to all for your help.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't forget to change the constant when daylight saving time ends and begins. (A constant is a poor solution, imho.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Thanks Ray for cautioning.

In this office somehow a manual process has been implemented as someone who physically update the reference table to get the offset. This table will always (I wish always) have the data for 2 years ahead. So it should be alright as far the data is being updated in time. To handle the risk, i am storing the original value too. In case the reference source fails to update the data, still a manual update can fix the issue.

Again thanks Ray for your comment.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Post Reply