Problem Note 70048: CALL IS8601_CONVERT does not compute durations properly
Beginning with SAS® 9.4M6, CALL IS8601_CONVERT does not always compute durations correctly. See the Full Code tab for a sample code.
Operating System and Release Information
SAS System | Base SAS | Windows 7 Home Premium 32 bit | 9.4 TS1M6 | |
Windows 7 Home Premium x64 | 9.4 TS1M6 | |
Windows 7 Professional 32 bit | 9.4 TS1M6 | |
Windows 7 Ultimate 32 bit | 9.4 TS1M6 | |
Windows 7 Professional x64 | 9.4 TS1M6 | |
Windows 7 Ultimate x64 | 9.4 TS1M6 | |
64-bit Enabled AIX | 9.4 TS1M6 | |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M6 | |
Microsoft Windows Server 2008 R2 | 9.4 TS1M6 | |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M6 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M6 | |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M6 | |
Microsoft Windows Server 2012 Std | 9.4 TS1M6 | |
Microsoft Windows Server 2016 | 9.4 TS1M6 | |
Microsoft Windows Server 2019 | 9.4 TS1M6 | |
Windows 7 Enterprise 32 bit | 9.4 TS1M6 | |
Windows 7 Enterprise x64 | 9.4 TS1M6 | |
Microsoft Windows Server 2008 | 9.4 TS1M6 | |
Microsoft Windows 10 | 9.4 TS1M6 | |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M6 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M6 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M6 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M6 | |
Microsoft Windows 8 Pro x64 | 9.4 TS1M6 | |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M6 | |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M6 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M6 | |
Microsoft® Windows® for x64 | 9.4 TS1M6 | |
z/OS 64-bit | 9.4 TS1M6 | |
z/OS | 9.4 TS1M6 | |
64-bit Enabled Solaris | 9.4 TS1M6 | |
HP-UX IPF | 9.4 TS1M6 | |
Linux for x64 | 9.4 TS1M6 | |
Solaris for x64 | 9.4 TS1M6 | |
*
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.
Beginning with SAS 9.4M6, durations aren't always computed properly with CALL IS8601_CONVERT. In this example, the duration is computed for the AESTDT and AEENDT variables, and the result is stored in the AEDUR variable.
To view the results, see the
Output tab.
DATA duration2;
INFILE datalines truncover;
LENGTH aedur aestdt aeendt $ 32;
INPUT @1 aestdt :$N8601E8. aeendt :$N8601E8.;
CALL IS8601_CONVERT('dt/dt','du',aestdt,aeendt,aedur);
aestdt_unf = aestdt;
aeendt_unf = aeendt;
FORMAT aestdt aeendt aedur $N8601E.;
DATALINES;
2022-12-30 2023-02-28
2022-12-30 2023-03-01
2021-12-29 2022-02-28
2021-12-29 2022-03-01
2021-12-28 2022-02-28
2021-12-28 2022-03-01
;
RUN;
Aestdt Aeendt Aedur
2022-12-30 2023-02-28 P2M
2022-12-30 2023-03-01 P2M15D **** This is obviously incorrect
2021-12-29 2022-02-28 P2M
2021-12-29 2022-03-01 P2M
2021-12-28 2022-02-28 P2M
2021-12-28 2022-03-01 P2M1D
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> CALL routines ==> IS8601_CONVERT
|
Date Modified: | 2023-05-01 12:11:37 |
Date Created: | 2023-04-25 14:49:41 |