By using the below code, I'm able to identify the current week number of the month. Thanks for the previous post by user: ballardw ( Posted 05-18-2017 07:23 PM )
data _null_;
week = week(today()) - week((intnx('month',today(),0,'B'))) +1;
call symputx('week',week);
run;
But I am facing difficulty, while running a report, which has to list the last week number......which means, if I am running a report now, it has to give me last week number, which is week4 (Here, I need to run a report that lists the data from last Monday to Saturday, i.e. 21st September to 27th September).
Any kind of help is greatly appreciated. Thanks
Subtract 7 from your two TODAY() calls.
Subtract 7 from your two TODAY() calls.
Thank you Sir. Appreciated.
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 lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.