SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 15924: DATETIMEw.d format can produce incorrect results

DetailsHotfixAboutRate It

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:

  1. 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
  2. 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

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SAS64-bit Enabled AIX9.1 TS1M09.2 TS1M0
Microsoft Windows XP Professional9.1 TS1M09.2 TS1M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M09.2 TS1M0
Microsoft Windows NT Workstation9.1 TS1M0
Microsoft Windows Server 2003 Standard Edition9.1 TS1M09.2 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M09.2 TS1M0
Microsoft Windows 2000 Server9.1 TS1M09.2 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M09.2 TS1M0
Microsoft Windows 2000 Professional9.1 TS1M09.2 TS1M0
Microsoft Windows 2000 Datacenter Server9.1 TS1M09.2 TS1M0
64-bit Enabled Solaris9.1 TS1M09.2 TS1M0
Microsoft Windows 2000 Advanced Server9.1 TS1M09.2 TS1M0
z/OS9.1 TS1M09.2 TS1M0
64-bit Enabled HP-UX9.1 TS1M09.2 TS1M0
Linux9.1 TS1M09.2 TS1M0
HP-UX IPF9.1 TS1M09.2 TS1M0
OpenVMS Alpha9.1 TS1M09.2 TS1M0
Tru64 UNIX9.1 TS1M09.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.