A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 48


The following SAS program is submitted:

libname temp 'SAS-data-library';

data work.new;

set temp.jobs;

format newdate mmddyy10.;

qdate = qtr(newdate);

ddate = weekday(newdate);

run;

proc print data = work.new;

run;

The variable NEWDATE contains the SAS date value for April 15, 2000.

What output is produced if April 15, 2000 falls on a Saturday?

Show Answer
Correct Answer: BD

April 15, 2000 is formatted as 04/15/2000 under the mmddyy10. format. Using the qtr function on this date will yield the quarter of the year, which is 2 (since April is in the second quarter). The weekday function returns the day of the week, where Saturday is represented by 7. Therefore, the correct output should contain newdate as 04/15/2000, qdate as 2, and ddate as 7.

Discussion

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

should be D. 1 04/15/2000 2 7

JKoOption: D
Jun 5, 2019

D. Obs newdate qdate ddate 1 04/15/2000 2 7

KleinstoneOption: C
Jan 10, 2021

answer is C