How to get sas date format "YYYYMM" in SAS ?
From this code below I would get '2011-11-01'
call symput('me',"'"||put(intnx('month',today(),-1 ),yymmdd10.)||"'");
I'm trying to get something like : '2011-11'
Thanks
Macro version:
%let date = %sysfunc(today());
%let me = %str(%")%sysfunc(intnx(month,&date,-1),yymmd7.)%str(%");
%put &me;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With