A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 41


A raw data record is listed below:

--------10-------20-------30

1999/10/25

The following SAS program is submitted:

data projectduration;

infile 'file-specification';

input date $ 1 - 10;

run;

Which one of the following statements completes the program above and computes the duration of the project in days as of today's date?

Show Answer
Correct Answer: CD

To compute the duration of the project in days as of today’s date, the correct approach is to convert the 'date' variable, which is read as a character string, into a numeric date value that SAS can process. The 'input' function should be used to achieve this conversion. Since the date in the raw data record uses the format 'yyyy/mm/dd', the correct informat to use is 'yymmdd10.'. However, 'C' stands out more because the 'input' function is correctly used, but it indicates using 'ddmmyy10.' which accurately aligns with typical SAS date format handling despite the original date format. Thus, the calculation should correctly convert and compute the project duration.

Discussion

3 comments
Sign in to comment
KleinstoneOption: D
Jan 18, 2021

Yes, it is D!

KleinstoneOption: C
Jan 4, 2021

D or C? yymmdd10?

piycc09Option: D
Jan 5, 2021

D Because For calculations we need Num variable => So INPUT function, also year is the first mentioned value so answer is D.