1---+----10---+----20---+---
son Frank 01/31/89
daughter June 12-25-87
brother Samuel 01/17/51
The following program is submitted using this file as input:
data work.family;
infile 'file-specification';
run;
Which INPUT statement correctly reads the values for the variable Birthdate as SAS date
values?
a. input relation $ first_name $ birthdate date9.;
b. input relation $ first_name $ birthdate mmddyy8.;
c. input relation $ first_name $ birthdate : date9.;
d. input relation $ first_name $ birthdate : mmddyy8.;
Check the comments below for answers....
7 comments:
Answer: d
An informat is used to translate the calendar date to a SAS date value. The date values are in the
form of two-digit values for month-day-year, so the MMDDYY8. informat must be used. When
using an informat with list input, the colon-format modifier is required to correctly associate the
informat with the variable name.
I think B also correct...
Answer D only
Answer is B.
Per SAS documentation, SAS date value is a value that represents the number of days between January 1, 1960, and a specified date.
Option B is giving the SAS dates, Option D is reading the dates as it is in input statement.
both b and d
both b and d
D
Post a Comment