Equalent to DATEADD in Datastage

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

Equalent to DATEADD in Datastage

Post by SURA »

Hello All

I had a situation where i need to convert from UTC Time to Local Time. In SQL Server i found a function called DATEADD. This function will returns a new datetime value based on adding an interval to the specified date.

Is there is any function can we use in Datastage to achive the same task?

Thanks in advance.
DS User
prakashdasika
Premium Member
Premium Member
Posts: 72
Joined: Mon Jul 06, 2009 9:34 pm
Location: Sydney

Post by prakashdasika »

DateFromDaysSince() for dates. TimestampFromSecondsSince() for timestamp.
Prakash Dasika
ETL Consultant
Sydney
Australia
djbarham
Participant
Posts: 34
Joined: Wed May 07, 2003 4:39 pm
Location: Brisbane, Australia

Re: Equalent to DATEADD in Datastage

Post by djbarham »

SURA wrote:DATEADD. This function will returns a new datetime value based on adding an interval to the specified date.

Is there is any function can we use in Datastage to achive the same task?
Have a look at TimestampOffsetByComponents
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Re: Equalent to DATEADD in Datastage

Post by BI-RMA »

djbarham wrote:Have a look at TimestampOffsetByComponents
The Offset-functions are new in 8.5! Not so often mentioned as goodies but much easier to handle than the alternatives from former versions (which are still present)!
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
Post Reply