Problem Note 35117: ANYDTDTE informat incorrectly interprets invalid date value as a SAS date
When the informat ANYDTDTE determines that a value can't be valid (not for MMDDYY, YYMMDD, or DDMMYY), the BEST informat is being used. This results in the original date value being represented as a SAS date.
In this example, '010001' can't be a valid date value. Instead of producing an 'invalid data' message and setting the DOB variable to missing, DOB is set to 10001. When the variable is formatted with the MMDDYY10. format, the result is 5/20/1987.
data a;
dob=input("010001",anydtdte6.);
put dob mmddyy10.;
run;
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | 9.2 TS2M2 |
Microsoft Windows XP Professional | 9.1 TS1M0 | 9.2 TS2M2 |
64-bit Enabled AIX | 9.1 TS1M0 | 9.2 TS2M2 |
64-bit Enabled HP-UX | 9.1 TS1M0 | 9.2 TS2M2 |
64-bit Enabled Solaris | 9.1 TS1M0 | 9.2 TS2M2 |
HP-UX IPF | 9.1 TS1M0 | 9.2 TS2M2 |
Linux | 9.1 TS1M0 | 9.2 TS2M2 |
OpenVMS Alpha | 9.1 TS1M0 | 9.2 TS2M2 |
Tru64 UNIX | 9.1 TS1M0 | 9.2 TS2M2 |
*
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: | medium |
Topic: | SAS Reference ==> Informats ==> Date and Time ==> ANYDTDTE Data Management ==> Manipulation and Transformation ==> Date and Time
|
Date Modified: | 2009-12-01 10:37:51 |
Date Created: | 2009-03-12 13:39:46 |