05-07-2013 12:09 PM
Hi there, I would like some help with the following macro:
%let dt = %SYSFUNC(today(),MONYY.);
This outputs the result: MAY13
How can this code be modified to show the previous month? i.e. APR13?
Secondly, how can I make it look a bit different? Let's say like: April 2013
05-08-2013 11:18 AM
I do not know of a single format to get "April 2013" output. I think you will need to use two function calls.
%let dt = %sysfunc(intnx(MONTH,%SYSFUNC(today()),-1));
%let dt = %sysfunc(putn(&dt,monname.)) %sysfunc(putn(&dt,year.));
Need further help from the community? Please ask a new question.