You likely don't.
If you remove the date9 format, it will likely work with your code:
%let mnth_strt_date_d = %sysfunc(intnx(month, %sysfunc(today()), -1, B ));
You also don't need PUT here, the second parameter for the SYSFUNC() is the format you'd like applied to the output.
If you really do think you need it, I'd actually put in the code to resolve correctly, this way the macro variable is more versatile.
So change wherever you're using the macro variable to the following, note the usage of double quotes.
"&mnth_strt_date_d."d
@Yozshura wrote:
I've created the following variable:
%let mnth_strt_date_d = %sysfunc(putn(%sysfunc(intnx(month, %sysfunc(today()), -1, B )), date9.));
I want to use mnth_strt_date_d as a date filter for a SAS table, but in order to so I need the value to be '01MAY19'd. Right now it is coming back as 01MAY19. How can I add the single quotes and d to mnth_strt_date_d?
Thank you!