Hi,
We need a parameter that take the last day of the month of the two last months. For example:
If the job is execute on 20110321 the parameter will be 20110131.
Can you help me please?
Thanks in advance!
PARM1 - Month
Hi,
You can compute it in two steps :
- Compute the last day of the previous month (Line 1)
- Extract the Year and the month (Line 2 and 3)
- Compute the last day of the previous month already computed (Line 4)
in the 'Set' tag, put:
Var Name____________________Value
%%LastDayMM1____________%%$CALCDATE %%OYEAR.%%OMONTH.01 -1
%%AAAA__________________%%SUBSTR %%LastDayMM1 1 4
%%MM___________________%%SUBSTR %%LastDayMM1 5 2
%%LastDayMM2____________%%$CALCDATE %%AAAA.%%MM.01 -1
%%PARM1_________________%%LastDayMM2
Jean-Michel.
You can compute it in two steps :
- Compute the last day of the previous month (Line 1)
- Extract the Year and the month (Line 2 and 3)
- Compute the last day of the previous month already computed (Line 4)
in the 'Set' tag, put:
Var Name____________________Value
%%LastDayMM1____________%%$CALCDATE %%OYEAR.%%OMONTH.01 -1
%%AAAA__________________%%SUBSTR %%LastDayMM1 1 4
%%MM___________________%%SUBSTR %%LastDayMM1 5 2
%%LastDayMM2____________%%$CALCDATE %%AAAA.%%MM.01 -1
%%PARM1_________________%%LastDayMM2
Jean-Michel.