Returns the date for the nth occurrence of a weekday for the specified month and year.
Syntax NWKDOM(n, weekday, month, year)
Required Arguments n specifies the numeric week of the month that contains the specified day.
Range:1–5
Tip:N=5 indicates that the specified day occurs in the last week of that month. Sometimes n=4 and n=5 produce the same results.
weekday specifies the number that corresponds to the day of the week.
Range:1–7
Tip:Sunday is considered the first day of the week and has a weekday value of 1.
month specifies the number that corresponds to the month of the year.
Range:1–12
year specifies a four-digit calendar year.
*************************
443 data _null_;
444 /* The last Monday in December of 2012. */
445 date=nwkdom(5,2,12,2012);
446 put date date9.;
447 run;
31DEC2012