Reading Date and Time Values | |
Lesson
Overview |
Introduction
SAS software provides many SAS informats for reading raw data values in various forms. If you took the lesson Reading Raw Data in Fixed Fields, you worked with informats to read standard and nonstandard data. In this lesson, you learn how to use a special category of SAS informats called date and time informats. These informats enable you to read a variety of common date and time expressions. After you read date and time values, you can also perform calculations with them. |
options yearcutoff=1920; data perm.aprbills; infile aprdata; input LastName $8. @10 DateIn mmddyy8. +1 DateOut mmddyy8. +1 RoomRate 6. @35 EquipCost 6.; Days=dateout-datein+1; RoomCharge=days*roomrate; Total=roomcharge+equipcost; run; |
This lesson contains 31 pages and takes approximately 45-60 minutes to complete. |
Objectives
In this lesson, you will learn
Before taking this lesson, you should have completed the following lessons: Introduction to SAS Programming |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.