全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1671 2
2015-02-27
The contents of the raw data file CALENDAR are listed below:
01012000
The following SAS program is submitted:
data test; infile 'calendar';
    input @1 date mmddyy10.;
    if date='01012000'd then event='January 1st';
run;
Which one of the following is the value of the EVENT variable?
A. 01012000
B. January 1st
C. .(missing numeric value)
D. The value can not be determined as the program fails to execute due to errors.
Answer: D
一直对日期型数据搞得不是很清楚,求问这边出现errors是因为if句应该写成if date='01Jan2000'd么?还是其他的原因?
之前发了一遍没发出去,希望这次可以成功~~~
二维码

扫码加我 拉你入群

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

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

全部回复
2015-2-28 09:03:05
日期只有写成'01Jan2000'd这样才会被sas认为是日期,月份一定是3位
二维码

扫码加我 拉你入群

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

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

2015-2-28 13:06:51
wpfwxn 发表于 2015-2-28 09:03
日期只有写成'01Jan2000'd这样才会被sas认为是日期,月份一定是3位
好的,谢谢~
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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