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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.