Problem Note 46759: IS8601_CONVERT enhanced to allow individual components
The call routine IS8601_CONVERT has been enhanced to allow individual components to be passed. In addition to the current values allowed for 'convert-from' and 'convert-to', this enhancement allows DTn, DUn, and Dn where n can be 1-6, and n different components will be picked up as separate arguments.
Although the individual component arguments are expected to be numeric, character values can be passed and will be converted. The values can be omitted or be missing values, and missing components are then used.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows Server 2008 | 9.4 TS1M0 | 9.4 TS1M0 |
64-bit Enabled AIX | 9.4 TS1M0 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.4 TS1M0 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.4 TS1M0 | 9.4 TS1M0 |
HP-UX IPF | 9.4 TS1M0 | 9.4 TS1M0 |
Linux for x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Linux on Itanium | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Enterprise 32 bit | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Home Premium 32 bit | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Home Premium x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Professional 32 bit | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Professional x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Solaris for x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Ultimate 32 bit | 9.4 TS1M0 | 9.4 TS1M0 |
Windows 7 Ultimate x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Windows Vista | 9.4 TS1M0 | 9.4 TS1M0 |
Windows Vista for x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 for x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft® Windows® for x64 | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.4 TS1M0 | 9.4 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.4 TS1M0 | 9.4 TS1M0 |
Z64 | 9.4 TS1M0 | 9.4 TS1M0 |
z/OS | 9.4 TS1M0 | 9.4 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.
The new values for 'convert-from' and 'convert-to' are Dtn, DUn, and Dn. This example shows DT6 as the first argument indicating that six variables are used as input for the datetime variable.
data temp;
input y mo d h min s;
length dt $16;
call is8601_convert('dt6','start',y,mo,d,h,min,s,dt);
put dt=$n8601e.;
datalines;
2011 6 . 10 15 20
2011 . 5 10 15 20
2011 6 30 10 15 20
;
run;
dt=2011-06--T10:15:20.000
dt=2011---05T10:15:20.000
dt=2011-06-30T10:15:20.000
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> CALL routines
|
Date Modified: | 2012-11-16 13:11:13 |
Date Created: | 2012-06-07 10:36:48 |