I have the 3rd thursday of each month calculated, however, I need it to be the next month. when I do m+1, and the month is December, it will not show January to the following year.
data want (drop= y m);
format iss_date mmddyy.;
do y = year(today());
do m = month(today()) ;
iss_date=nwkdom(3,5,m,y);
output;
end;
end;
run;
This will give you the third Thursday of next month
data _null_;
dt = intnx('week.5', intnx('month',today(),0,'e'), 3, 'b');
format dt date9.;
put dt;
run;
This will give you the third Thursday of next month
data _null_;
dt = intnx('week.5', intnx('month',today(),0,'e'), 3, 'b');
format dt date9.;
put dt;
run;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.