how to get previous month value from given date vaule

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
sathishmca
Participant
Posts: 43
Joined: Mon Mar 03, 2008 10:58 pm
Location: Chennai

how to get previous month value from given date vaule

Post by sathishmca »

Hi,
Can any one tell me how to get previous month value from given date vaule?

Ex: 22-2-2009 ---> 22-1-2009

Please do the need full.
Sathish Bhojan
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What happens if your date is 31-03-2009 ???
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ray has some pre-built Server date handling routines he loves to give away. As they say 'Why reinvent the wheel?' :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage itself has some really useful built-in Transforms, particularly MONTH.FIRST and MONTH.LAST. These will go a long way you solving your not-very-well-specified problem. We don't really know, in a general sense, what problem you are trying to solve.
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