ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 91

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?
A. Obs newdate qdate ddate
1 APR152000 2 6
B. Obs newdate qdate ddate
1 04/15/2000 2 6
C. Obs newdate qdate ddate
1 APR152000 2 7
D. Obs newdate qdate ddate
1 04/15/2000 2 7
Click Comment link to get answer

11 comments:

  1. Anonymous7:08 AM

    D

    The QTR function returns a value of 1, 2, 3, or 4 from a SAS date value to indicate the quarter of the year in which a date value falls.

    Value Day of the Week
    1 Sunday
    2 Monday
    3 Tuesday
    4 Wednesday
    5 Thursday
    6 Friday
    7 Saturday

    ReplyDelete
  2. Anonymous3:16 PM

    weekday 是求礼拜几,礼拜日是1,礼拜六是7

    ReplyDelete
    Replies
    1. Anonymous10:40 AM

      谢谢了

      Delete
    2. This comment has been removed by the author.

      Delete
  3. Jahnavi12:18 PM

    D

    Day of Weeks Starts from Sunday..

    ReplyDelete
  4. Week starts from Sunday and second quarter starts from April 1.

    ReplyDelete
  5. I ran prgm:
    data work.new;
    newdate='15APR2000'd;
    format newdate mmddyy10.;
    qdate = qtr(newdate);
    ddate = weekday(newdate);
    run; ans came D

    ReplyDelete
  6. It is very use full blog and very important information about SAS.
    Online SAS Training
    SAS training

    ReplyDelete