Page 1 of 1

Working with Dates

Posted: Mon May 16, 2011 8:25 pm
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

Posted: Mon May 16, 2011 8:38 pm
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).