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
myukassign
Premium Member
Posts: 238 Joined: Fri Jul 25, 2008 8:55 am
Post
by myukassign » Wed Jul 30, 2008 12:29 am
Can anyone help me to resolve this issue?
I want to reduce 1 month from anydate given and should give me the new date. This should be done thorugh the transformer.
Can anyone tell me a function and its usage?
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Wed Jul 30, 2008 1:23 am
There are various ways to do this using different functions. The answer depends on how you define "subtract one month". What is one month less than "July 31"? The simple method is to use ICONV() and OCONV() to convert a display date into an internal date, then subtract 30 and reconvert to a display date. But this might not satisfy your rules and a more complex method would need to be used.
Last edited by
ArndW on Wed Jul 30, 2008 7:17 am, edited 1 time in total.
myukassign
Premium Member
Posts: 238 Joined: Fri Jul 25, 2008 8:55 am
Post
by myukassign » Wed Jul 30, 2008 2:05 am
Oho that function is working for me....
Thanks for the reply...
myukassign
Premium Member
Posts: 238 Joined: Fri Jul 25, 2008 8:55 am
Post
by myukassign » Wed Jul 30, 2008 2:30 am
Oho that function is working for me....
Thanks for the reply...
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Jul 30, 2008 6:34 am
ArndW wrote: The simple method is to use ICONV() and OCONV() to convert a display date
Fixed that for ya.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Wed Jul 30, 2008 7:17 am
Fixed what, Craig
(I love revisionist history)
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Jul 30, 2008 7:21 am
Dang, where's a WABAC machine when you need one?
-craig
"You can never have too many knives" -- Logan Nine Fingers