DATA TEMP; X= ‘13MAR2000’d;RUN;What is stored in x?

  1. Corresponds to days from 01 Jan 1960: 14682

  2. 13MAR2000

  3. 13/03/2000

  4. 03/13/2000


Correct Option: A
Explanation:

To solve this question, the user needs to know the basics of SAS date format. In SAS, the dates are stored as a number that corresponds to the number of days since January 1, 1960. When a date is read into SAS, it is converted into a number and stored as a SAS date value.

In the given SAS code, the date '13MAR2000' is assigned to variable X. This means that the value of X will be the SAS date value corresponding to '13MAR2000'.

Now, let's go through each option and explain why it is right or wrong:

A. Corresponds to days from 01 Jan 1960: 14682: This option is correct. The SAS date value corresponding to '13MAR2000' is 14682, which represents the number of days between January 1, 1960, and March 13, 2000.

B. 13MAR2000: This option is incorrect because the SAS date value is a number, not a character string. Although the date '13MAR2000' was assigned to X, it is stored as a SAS date value, not a character string.

C. 13/03/2000: This option is incorrect because it is a date format used in other programming languages, but not in SAS. The SAS date format is different from other date formats used in programming.

D. 03/13/2000: This option is incorrect because it is a date format used in some countries, but not in SAS. The SAS date format is different from other date formats used in different countries.

The Answer is: A. Corresponds to days from 01 Jan 1960: 14682

Find more quizzes: