Setting Up Your SAS Session |
Setting System
Options |
How Four-Digit Years Are Handled Remember, the value of the YEARCUTOFF= system option only affects two-digit year values. A date value that contains a four-digit year value will be interpreted correctly even if it does not fall within the 100-year span set by the YEARCUTOFF= system option. |
Date Expression | SAS Date Informat | Interpreted As |
06Oct59 | date7. | 06Oct1959 |
17Mar1783 | date9. | 17Mar1783 |
However, if you specify an inappropriate field width, you will receive incorrect results. Notice that the date expression in the table below contains a 4-digit year value. The informat does not specify enough positions to read the entire value, so the last two digits of the year are not read and SAS software uses 17 as the last two digits of the year. |
Date Expression | SAS Date Informat | Interpreted As |
17Mar1783 | date7. | 17Mar2017 |
Points to Remember
When you work with date values,
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.