Chapter 19: SAS Date and Time Values

  1. Correct answer: c
    A SAS date value is the number of days from January 1, 1960, to the given date.
  2. Correct answer: d
    In addition to tracking time intervals, SAS date and time values can be used in calculations like other numeric values. This lets you calculate values that involve dates much more easily than in other programming languages.
  3. Correct answer: b
    SAS automatically makes adjustments for leap years.
  4. Correct answer: d
    The SAS informat MMDDYYw. reads dates such as 10222001, 10/22/01, or 10-22-01. In this case, the field width is eight.
  5. Correct answer: b
    The minimum acceptable field width for the TIMEw. informat is five. If you specify a w value less than five, you will receive an error message in the SAS log.
  6. Correct answer: d
    In the time value of a date and time expression, you must use delimiters to separate the values for hour, minutes, and seconds.
  7. Correct answer: c
    The value of the YEARCUTOFF= system option does not affect four-digit year values. Four-digit values are always read correctly.
  8. Correct answer: c
    The w value of the informat MMDDYY8. is too small to read the entire value, so the last two digits of the year are truncated. The last two digits thus become 19 instead of 25. Because the YEARCUTOFF= system option is set to 1920, SAS interprets this year as 2019. To avoid such errors, be sure to specify an informat that is wide enough for your date expressions.
  9. Correct answer: b
    To find the number of days spanned by two dates, subtract the first day from the last day and add one. Because SAS date values are numeric values, they can easily be used in calculations.
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.44.143