SUPPORT / SAMPLES & SAS NOTES
 

Support

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

DetailsAboutRate It

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

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.3 TS1M0
z/OS 64-bit9.3 TS1M0
Microsoft® Windows® for x649.3 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M0
Microsoft Windows Server 2003 Standard Edition9.3 TS1M0
Microsoft Windows Server 2003 for x649.3 TS1M0
Microsoft Windows Server 20089.3 TS1M0
Microsoft Windows Server 2008 R29.3 TS1M0
Microsoft Windows Server 2008 for x649.3 TS1M0
Microsoft Windows XP Professional9.3 TS1M0
Windows 7 Enterprise 32 bit9.3 TS1M0
Windows 7 Enterprise x649.3 TS1M0
Windows 7 Home Premium 32 bit9.3 TS1M0
Windows 7 Home Premium x649.3 TS1M0
Windows 7 Professional 32 bit9.3 TS1M0
Windows 7 Professional x649.3 TS1M0
Windows 7 Ultimate 32 bit9.3 TS1M0
Windows 7 Ultimate x649.3 TS1M0
Windows Vista9.3 TS1M0
Windows Vista for x649.3 TS1M0
64-bit Enabled AIX9.3 TS1M0
64-bit Enabled HP-UX9.3 TS1M0
64-bit Enabled Solaris9.3 TS1M0
HP-UX IPF9.3 TS1M0
Linux9.3 TS1M0
Linux for x649.3 TS1M0
Solaris for x649.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.