SAS Base Programming for SAS 9 — Question 11
Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Alan -
19/2/2004
ACCT -
Rob -
22/5/2004
MKTG -
MaryJane -
14/3/2004
EDUC -
The following SAS program is submitted:
data emps;
infile employee;
input@1 name$
@15 date <insert INFORMAT here>
@25 department$;
run;
Which INFORMAT correctly completes the program?
Answer options
- A. date9.
- B. ddmmyyyy9.
- C. ddmmyy10.
- D. ddmmyyyy10.
Correct answer: C
Explanation
The correct answer is C, ddmmyy10., as it matches the date format of 'dd/mm/yyyy' used in the data file. Options A and B do not account for the full year needed, and option D includes an extra digit in the format that is unnecessary for the given data.