SAS_Institute
A00-280 · Question #72
The following SAS program is submitted: ``sas data WORK.DATE_INFO; X='04JUL12:03:'; DayofMonth=day(x); MonthofYear=month(x); Year=year(x); run; `` Which types of variables are DayofMonth…
The correct answer is B. DayofMonth, Year, and MonthofYear are numeric. See the full explanation below for the reasoning.
Question
The following SAS program is submitted:
data WORK.DATE_INFO;
X='04JUL12:03:';
DayofMonth=day(x);
MonthofYear=month(x);
Year=year(x);
run;
Which types of variables are DayofMonth, MonthofYear, and Year?Options
- ADayofMonth, Year, and MonthofYear are character.
- BDayofMonth, Year, and MonthofYear are numeric.
- CDayofMonth and Year are numeric. MonthofYear is character
- DDayofMonth, Year, and MonthofYear are date values
How the community answered
(24 responses)- A4% (1)
- B83% (20)
- C4% (1)
- D8% (2)
Community Discussion
No community discussion yet for this question.