Reading Date and Time Values | |
Reading Dates and Times Using
Informats |
You use SAS date and time
informats to read date and time expressions
and convert them to SAS date and time values. Like other SAS informats, date
and time informats are composed of
SAS informat names indicate the form of date expression that can be read
using that particular informat. Here are some examples of common date and
time informats:
As you know, there are several ways to write a particular date. For example, all the following expressions represent the date October 15, 1999. Each of these common date expressions can be read using the appropriate SAS date informat. |
Date Expression | SAS Date Informat |
---|---|
10/15/99 | |
15Oct99 | DATEw. |
MMDDYYw. | |
99/10/15 | YYMMDDw. |
General form, INPUT statement with an informat:
where
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.