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么?还是其他的原因?
之前发了一遍没发出去,希望这次可以成功~~~