O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Dates and Times in Calculations

In this chapter so far, you've learned how date and time informats read common date and time expressions in specific forms. Now you will see how converting date and time expressions to numeric SAS date values can be useful, particularly for determining time intervals or performing calculations.
Suppose you work in the billing department of a small community hospital. It's your job to create a SAS data set from the raw data file that is referenced by the fileref Aprdata. A portion of the raw data file below shows data values that represent each patient's
  • last name
  • date checked in
  • date checked out
  • daily room rate
  • equipment cost.
Raw Data File Aprdata
The data set that you create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required