24 months back date from Current date

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
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

24 months back date from Current date

Post by Titto »

Hi,

Need some information to get the 24 months back date from the current date. I need to use this date for filtering out the records which are older then 24 months.

any help is appreciated!

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

Post by ray.wurlod »

Split the date into year, month and day. Subtract 2 from the year. If the month and day are 2 and 29 subtract 1 from the day. Re-assemble date.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Other option would be, convert it into Julian date and subtract two years of days from it. Leap year should also be taken care while subtacting.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply