Hi,
I'm using the following code to produce MMMYYYY as at today's date and it works fine.
%let monyear=%substr(%sysfunc(today(), date9.),3,7);
%put &monyear;
DEC2005
Trouble is, I need to modify the code to give the previous month in the macro output, so today it would give
NOV2005.
Any help would be much appreciated!
I'm using the following code to produce MMMYYYY as at today's date and it works fine.
%let monyear=%substr(%sysfunc(today(), date9.),3,7);
%put &monyear;
DEC2005
Trouble is, I need to modify the code to give the previous month in the macro output, so today it would give
NOV2005.
Any help would be much appreciated!