Problem Note 15924: DATETIMEw.d format can produce incorrect results
If a datetime value is formatted using the DATETIMEw.d format, the value
may be inappropriately rounded. There are two situations when this can
occur:
- a non-zero value is used for the decimal specification of the
DATETIMEw.d format
For example:
data _null_;
x='02aug2005:00:14:23.999'dt;
put x=datetime30.2;
run;
incorrectly produces:
x=03AUG2005:00:00:00.00
while:
data _null_;
x='02aug2005:00:14:23.999'dt;
put x=datetime30.3;
run;
correctly produces:
x=02AUG2005:00:14:23.999
- the datetime value is less than one second from midnight
For example:
data _null_;
dt=-1E-12;
put dt=datetime.;
run;
produces:
dt=02JAN60:00:00:00
The format should correctly generate 01JAN60:00:00:00.
This problem is corrected in SAS® 9.2.
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | 64-bit Enabled AIX | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows 2000 Server | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | 9.2 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M0 | 9.2 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | 9.2 TS1M0 |
z/OS | 9.1 TS1M0 | 9.2 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M0 | 9.2 TS1M0 |
Linux | 9.1 TS1M0 | 9.2 TS1M0 |
HP-UX IPF | 9.1 TS1M0 | 9.2 TS1M0 |
OpenVMS Alpha | 9.1 TS1M0 | 9.2 TS1M0 |
Tru64 UNIX | 9.1 TS1M0 | 9.2 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: | high |
Topic: | SAS Reference ==> Formats
|
Date Modified: | 2006-06-20 13:51:22 |
Date Created: | 2005-08-12 09:23:06 |