SAS Base Programming for SAS 9 — Question 20
The following SAS program is submitted:
data one;
date = 04juI2005d;
format date weekdate.; run;
proc print data = one; run;
What output is generated?
Answer options
- A. Obs date 1 Monday, July 4, 2005
- B. Obs date 1 July4, 2005
- C. Obs date 1 04Jul2005
- D. Obs date
Correct answer: A
Explanation
The correct answer is A because the 'weekdate.' format displays the date in a complete format including the day of the week, which is Monday for July 4, 2005. The other options do not use the specified format and therefore would not generate the expected output.