When reading numeric data in SAS, leading zeros do not effect the value assigned to the variable and are not stored with the value. This convention is also used by SAS date informats to interpret all "components" of a date value. As a result, year values of 0000-0099 are treated as two-digit years, and the YEARCUTOFF= system option is used to assign the century. For example:
Assuming YEARCUTOFF=1920 (the Version 8 default), the variable DATE is correctly assigned the value of January 1, 2002.
The following example illustrates the same convention applied to the "day" component of the date. DATE is assigned the same value as above:
This behavior is by design and not considered a bug.
SAS System | Base SAS | Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 8 Enterprise 32-bit | | |
Microsoft Windows 8 Enterprise x64 | | |
Microsoft Windows 8 Pro 32-bit | | |
z/OS | | |
z/OS 64-bit | | |
OpenVMS VAX | | |
Microsoft Windows 8 Pro x64 | | |
Microsoft Windows 8.1 Pro | | |
Microsoft Windows 8.1 Enterprise 32-bit | | |
Microsoft Windows 8.1 Enterprise x64 | | |
Tru64 UNIX | | |
Solaris for x64 | | |
OpenVMS on HP Integrity | | |
Solaris | | |
OpenVMS Alpha | | |
Linux for x64 | | |
Linux on Itanium | | |
Linux | | |
HP-UX IPF | | |
IRIX | | |
AIX | | |
HP-UX | | |
ABI+ for Intel Architecture | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
64-bit Enabled AIX | | |
Windows Vista | | |
Windows Vista for x64 | | |
Windows Millennium Edition (Me) | | |
Windows 7 Ultimate x64 | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Professional 32 bit | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Enterprise x64 | | |
Windows 7 Enterprise 32 bit | | |
Microsoft Windows Server 2012 Std | | |
Microsoft Windows XP Professional | | |
Microsoft Windows Server 2012 R2 Std | | |
Microsoft Windows Server 2012 R2 Datacenter | | |
Microsoft Windows Server 2012 Datacenter | | |
Microsoft Windows Server 2008 R2 | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 8.1 Pro 32-bit | | |