Page 1 of 1

Subtract 1 month from any date given

Posted: Wed Jul 30, 2008 12:29 am
by myukassign
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?

Posted: Wed Jul 30, 2008 1:23 am
by ArndW
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.

Posted: Wed Jul 30, 2008 2:05 am
by myukassign
Oho that function is working for me....

Thanks for the reply...

Posted: Wed Jul 30, 2008 2:30 am
by myukassign
Oho that function is working for me....

Thanks for the reply...

Posted: Wed Jul 30, 2008 6:34 am
by chulett
ArndW wrote:The simple method is to use ICONV() and OCONV() to convert a display date
Fixed that for ya. :wink:

Posted: Wed Jul 30, 2008 7:17 am
by ArndW
Fixed what, Craig :twisted: (I love revisionist history)

Posted: Wed Jul 30, 2008 7:21 am
by chulett
Dang, where's a WABAC machine when you need one? :lol: