Previous 2 months 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
sandeepJajee
Participant
Posts: 12
Joined: Sat Jun 27, 2009 5:44 am

Previous 2 months Date

Post by sandeepJajee »

Hi,

How to get the Previous 2 months from Given Date in Datastage Parallel Jobs?

Date format=yyyy-mm-dd

Any help would be appreciated.

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

Post by ray.wurlod »

Search. This exact question has been answered within the last week.
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 »

Perhaps... depending on what exactly is meant by 'the previous 2 months'. How about an example to clear things up for us?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sandeepJajee
Participant
Posts: 12
Joined: Sat Jun 27, 2009 5:44 am

Post by sandeepJajee »

Hi,
I have searched the question ..its not yet answered in forum.

Ex:date=2009-04-25 [ccyy-mm-dd]

Output Date:2009-02-25

After doing conversion keep same DD and then make
sure that it is a valid date. If an end of month DD then move the
correct DD for that MM.

say for I/date=2008-04-30
after converion its 2008-02-30..but its invalid date so we have to move the correct date for that month.
if you need more information do let me know.
if we can use any routines or any functions in datastage .it would be great help for me.

Thanks.
Regards,
Sandeep Jajee
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Actually it is answered in the forum and as Ray noted, quite recently.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kpsita
Participant
Posts: 99
Joined: Tue Jul 21, 2009 11:43 pm

Post by kpsita »

Please check Date&Time function under Transformer/Functions.It has many functions like Days from, Months from...etc..etc
KPSITA
Post Reply