全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1271 1
2012-12-02
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







二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-12-2 17:58:34
这个得顶,SAS的函数非常强大,希望楼主能够继续将一些实战中好用的函数拿出来讲解一下
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群