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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.