O'Reilly logo

SAS Certification Prep Guide, 4th 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

Suppose you work in the billing department of a small community hospital. It is 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 the following patient data:
  • last name
  • date checked in
  • date checked out
  • daily room rate
  • equipment cost
Figure 19.1 Raw Data File Aprdata
Raw data file Aprdata.
The data set that you create must also include variable values that represent how many days each person stayed in the hospital, the total room charges, and the total of all expenses that each patient incurred. To create the ...

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