Problem Note 65307: You might encounter an issue in which two-digit year dates have the wrong century in SAS® 9.3 and earlier releases
In SAS 9.3 and earlier, the default value of the YEARCUTOFF= option is 1920. This default setting is going to cause data integrity issues because any two-digit years of "20" in dates will be assumed to be 1920 instead of 2020. If the intended year in the date is 2020, you must set the YEARCUTOFF= option to a value larger than 1920. The best alternative is to always specify four-digit years in dates to avoid confusion.
Background
The YEARCUTOFF= system option lets you specify which century SAS software should assign to dates with two-digit years used in SAS programs and input data. The YEARCUTOFF= option specifies the first year of a 100-year window in which all two-digit years are assumed to occur. For example, if the YEARCUTOFF= option is set to 1920, which is the default for SAS 9.3 and earlier, all two-digit years are assumed to occur between 1920 and 2019. This behavior means that two-digit years from 20 to 99 are assigned a century prefix of "19," and all two-digit years from 00 to 19 have a century prefix of "20."
The YEARCUTOFF= option affects the interpretation of two-digit years in the following cases:
- Reading date values from external files
- Specifying dates or year values in SAS functions
- Specifying SAS date literals
The YEARCUTOFF= option has no effect in the following cases:
- Processing dates with four-digit years
- Processing dates already stored as SAS date values (the number of days since January 1, 1960)
- Displaying dates with SAS date formats
Workaround
You can specify the YEARCUTOFF= option in an OPTIONS statement, autoexec file, config file, and so on. For the complete list of where you can specify a change to the current option setting, see the YEARCUTOFF= System Option section in SAS(R) 9.3 System Options: Reference, Second Edition.
For a workaround involving using a rolling value for the YEARCUTOFF= option, see SAS Note 65647, "Set up a rolling YEARCUTOFF option value."
The default value for the YEARCUTOFF= option changed in SAS® 9.4 to 1926. The default setting of 1926 for YEARCUTOFF remains through SAS® 9.4M6 (TS1M6). Beginning in SAS® 9.4M7 (TS1M7), the default value for the YEARCUTOFF= system option is 1940. This change makes it easier for customers who are still using two-digit years of "20" to make sure that the date is assigned to 2020. For more information about this change, see SAS Note 46368, "The default value for the YEARCUTOFF= system option has changed in SAS® 9.4 and beyond."
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | |
z/OS 64-bit | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Solaris for x64 | 9.3 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | alert |
Topic: | SAS Reference ==> System Options ==> YEARCUTOFF=
|
Date Modified: | 2020-01-07 09:50:42 |
Date Created: | 2020-01-06 15:15:16 |