BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
abbygrover
Calcite | Level 5

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;

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

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;

View solution in original post

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

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;
abbygrover
Calcite | Level 5
THANK YOU!!!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 861 views
  • 1 like
  • 2 in conversation