Working with Dates

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
DSFreddie
Participant
Posts: 130
Joined: Wed Nov 25, 2009 2:16 pm

Working with Dates

Post by DSFreddie »

Hi All,

I have a requirement for a Date field in one of my DataSTage job where I need to do a (DATE - 6 months) function.
The Input Source is a flat file & we need to perform this calculation before getting the data loaded to the Target Table.

Setting an example of the scenario here, It would be (17-05-2011) - 6 months.I tried searching the forum, but was not able to find any posts related to this.
Any help will be greatly appreciated.

Thanks,
Freddie
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are basically two approaches. One is to perform arithmetic on the individual components, the other is to use something like DateFromDaysSince() function with an offset of -183 days (a close approximation to six months).
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