The following SAS program is submitted:
data WORK.DATE_INFO;
X=”01Jan1960″D ;
run;
Variable X contains what value?
A. the numeric value 0
B. the character value “01Jan1960”
C. the date value 01011960
D. the code contains a syntax error and does not execute.
注解:Letter D is used to convert a normal date in DDMMMYY or DDMMMYYYY format to SAS date value. Check SAS Base (16) for details.
This question has another version. A space is placed between the closing quotation mark and letter D. This will cause a compile error and the answer would be D.