Hi, I am trying to run a job which must ran for a date 3 months in the past and I can't find an easy way to do this...ideally it would be something like:
%%3MONTHSAGO = %%CALCDATE %%MONTH -3
but that would be too easy...
Using V.8
Many thanks
Can you use CALCDATE to determine the date 3 months ago?
Re: Can you use CALCDATE to determine the date 3 months ago?
To do that use this :
%%NEWDATE = %%CALCDATE %%DATE -90
%%NEWDATE = %%CALCDATE %%ODATE -90
%%3MONTHSAGO = %%SUBSTR %%NEWDATE 3 2
%%NEWDATE = %%CALCDATE %%DATE -90
%%NEWDATE = %%CALCDATE %%ODATE -90
%%3MONTHSAGO = %%SUBSTR %%NEWDATE 3 2
Re: Can you use CALCDATE to determine the date 3 months ago?
CALCDATE is an internal function that adds or subtracts days. I do not think you can get an exact date 3 months ago using it. -90 days does get you close.