how would I check e.g. "First Saturday in current Month" or "Last Sunday in current Month"? I checked [pre]intnx[/pre] but couldn't find the solution there. With something like[pre]
%if weekday(today()) = 7 and day(today()) lt 8 %then %do;
I could solve this Problem; but is there a "nicer" way?
exactly two years later I have a similar date-Problem: how to determine the last workday (Friday) on or before the 25th? )
Let's assume I have a variable d25cm (25th of current month). I tried with
WDB25=intnx('week.6',&d25cm,(weekday(&d25cm) in (2,3,4,5,6))-1);
if today() = WDB25 then do;
/* more code */
but that doesn't work as expected. Any idea will be of great help!