|
Chapter Contents |
Previous |
Next |
| Date Intervals, Formats, and Functions |
Table 3.2 summarizes the SAS date and datetime informats available in SAS software. See Chapter 2, "Working with Time Series Data," for a discussion of the use of date and datetime informats. Refer to SAS Language: Reference for a complete description of these informats.
For each informat, Table 3.2 shows an example of a date or datetime value written in the style that the informat is designed to read. The date 17 October 1991 and the time 2:25:32 p.m. are used for the example in all cases. table informats shows the width range allowed by the informat and shows the default width in parenthesis.
Table 3.2: SAS Date and Datetime Informats| Informant | Width | Default | |
|---|---|---|---|
| Example | Description | Range | Width |
| DATEw. | day, month abbreviation, and year: | 7-32 | 7 |
| 17oct91 | ddMONyy | ||
| DATETIMEw.d | date and time: ddMONyy:hh:mm:ss | 13-40 | 18 |
| 17oct91:14:45:32 | |||
| DDMMYYw. | day, month, year: ddmmyy, dd/mm/yy, | 6-32 | 6 |
| 17/10/91 | dd-mm-yy, or dd mm yy | ||
| JULIANw. | year and day of year (Julian dates): yyddd | 5-32 | 5 |
| 91290 | |||
| MMDDYYw. | month, day, year: mmddyy, mm/dd/yy, | 6-32 | 6 |
| 10/17/91 | mm-dd-yy, or mm dd yy | ||
| MONYYw. | month abbreviation and year | 5-32 | 5 |
| Oct91 | |||
| NENGOw. | Japanese Nengo notation | 7-32 | 10 |
| H.03/10/17 | |||
| TIMEw.d | hours, minutes, seconds: hh:mm:ss | 5-32 | 8 |
| 14:45:32 | or hours, minutes: hh:mm. | ||
| YYMMDDw. | year, month, day: yymmdd, yy/mm/dd, | 6-32 | 6 |
| 91/10/17 | yy-mm-dd, or yy mm dd | ||
| YYQw. | year and quarter of year: yyQq | 4-32 | 4 |
| 91Q4 |
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.