Chapter Contents |
Previous |
Next |
Date Intervals, Formats, and Functions |
Table 3.3 lists the date formats available in SAS software. For each format, an example is shown of a date value in the notation produced by the format. The date '17OCT91'D is used as the example.
Table 3.3: SAS Date FormatsFormat | Width | Default | |
---|---|---|---|
Example | Description | Range | Width |
DATEw. | day, month abbreviation, year: | 5-9 | 7 |
17oct91 | ddMONyy | ||
DAYw. | day of month | 2-32 | 2 |
17 | |||
DDMMYYw. | day, month, year: dd/mm/yy | 2-8 | 8 |
17/10/91 | |||
DOWNAMEw. | name of day of the week | 1-32 | 9 |
Thursday | |||
JULDAYw. | day of year | 3-32 | 3 |
290 | |||
JULIANw. | year and day of year: yyddd | 5-7 | 5 |
91290 | |||
MMDDYYw. | month, day, year: mm/dd/yy | 2-8 | 8 |
10/17/91 | |||
MMYYw. | month and year: mmMyy | 5-32 | 7 |
10M1991 | |||
MMYYCw. | month and year: mm:yy | 5-32 | 7 |
10:1991 | |||
MMYYDw. | month and year: mm-yy | 5-32 | 7 |
10-1991 | |||
MMYYPw. | month and year: mm.yy | 5-32 | 7 |
10.1991 | |||
MMYYSw. | month and year: mm/yy | 5-32 | 7 |
10/1991 | |||
MMYYNw. | month and year: mmyy | 5-32 | 6 |
101991 | |||
MONNAMEw. | name of month | 1-32 | 9 |
October | |||
MONTHw. | month of year | 1-32 | 2 |
10 | |||
MONYYw. | month abbreviation and year: | 5-7 | 5 |
OCT91 | MONyy | ||
QTRw. | quarter of year | 1-32 | 1 |
4 | |||
QTRRw. | quarter in Roman numerals | 3-32 | 3 |
IV | |||
NENGOw. | Japanese Nengo notation | 2-10 | 10 |
H.03/10/17 | |||
WEEKDATEw. | day-of-week, month-name dd, yy | 3-37 | 29 |
Thursday, October 17, 1991 | |||
WEEKDATXw. | day-of-week, dd month-name yy | 3-37 | 29 |
Thursday, 17 October 1991 | |||
WEEKDAYw. | day of week | 1-32 | 1 |
5 | |||
WORDDATEw. | month-name dd, yy | 3-32 | 18 |
October 17, 1991 | |||
WORDDATXw. | dd month-name yy | 3-32 | 18 |
17 October 1991 | |||
YEARw. | year | 2-32 | 4 |
1991 | |||
YYMMw. | year and month: yyMmm | 5-32 | 7 |
1991M10 | |||
YYMMCw. | year and month: yy:mm | 5-32 | 7 |
1991:10 | |||
YYMMDw. | year and month: yy-mm | 5-32 | 7 |
1991-10 | |||
YYMMPw. | year and month: yy.mm | 5-32 | 7 |
1991.10 | |||
YYMMSw. | year and month: yy/mm | 5-32 | 7 |
1991/10 | |||
YYMMNw. | year and month: yymm | 5-32 | 7 |
199110 | |||
YYMONw. | year and month abbreviation: | 5-32 | 7 |
1991OCT | yyMON | ||
YYMMDDw. | year, month, day: yy/mm/dd | 2-8 | 8 |
91/10/17 | |||
YYQw. | year and quarter: yyQq | 4-6 | 4 |
91Q4 | |||
YYQCw. | year and quarter: yy:q | 4-32 | 6 |
1991:4 | |||
YYQDw. | year and quarter: yy-q | 4-32 | 6 |
1991-4 | |||
YYQPw. | year and quarter: yy.q | 4-32 | 6 |
1991.4 | |||
YYQSw. | year and quarter: yy/q | 4-32 | 6 |
1991/4 | |||
YYQNw. | year and quarter: yyq | 3-32 | 5 |
19914 | |||
YYQRw. | year and quarter in Roman | 6-32 | 8 |
1991QIV | numerals: yyQrr | ||
YYQRCw. | year and quarter in Roman | 6-32 | 8 |
1991:IV | numerals: yy:rr | ||
YYQRDw. | year and quarter in Roman | 6-32 | 8 |
1991-IV | numerals: yy-rr | ||
YYQRPw. | year and quarter in Roman | 6-32 | 8 |
1991.IV | numerals: yy.rr | ||
YYQRSw. | year and quarter in Roman | 6-32 | 8 |
1991/IV | numerals: yy/rr | ||
YYQRNw. | year and quarter in Roman | 6-32 | 8 |
1991IV | numerals: yyrr | ||
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.