Maxim 28: Macro Variables Need No Formats.
By using raw values, you can use your dates without having to add quotes and the trailing d everywhere you put them in code.
(Exception: when macro variables are used in human-readable output, like titles etc).
So see this code:
%let nin_TM = %sysfunc(intnx(month,%sysfunc(today()),0,b));
%let nin_LM = %sysfunc(intnx(month,&nin_tm.,-1,b));
%let nin_LY = %sysfunc(intnx(year,&nin_tm.,-1,s));
You can display the formatted values (for control) like this:
data _null_;
nin_tm = &nin_tm.;
nin_lm = &nin_lm.;
nin_ly = &nin_ly.;
format nin: date9.;
put nin_tm= nin_lm= nin_ly=;
run;