Adding month to current date

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Adding month to current date

Post by deva »

Hi all,
Please advise me how to add one month to current date.

Please let me know if there is any function.

We are using Datastage 7.1 server
Os windows xp.
DB oracle


Thanks in advance
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Nothing out of the box. You can click on Ray's footer that will take you to his page. He has a routine that will solve your problem.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Define one month. If today is 2007-01-31, do you expect 2007-02-28? If it's 2007-02-28, do you expect 2007-03-31? You need to be very clear. Simply incrementing the month and potentially the year doesn't handle the varying days in a month. You need to be clear on "date rounding".

Otherwise, there's functions already posted on ths forum to do almost exactly what you're asking. Use the Search facility.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Please help me

Post by deva »

DSguru2B wrote:Nothing out of the box. You can click on Ray's footer that will take you to his page. He has a routine that will solve your problem.
I am not getting any page. Could you please give me the copy of that routine
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Search for a link on this page. It has a few routines, including the one that you want.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I was about to suggest the very same page! :wink:
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