Informats |
Category: | Date and Time |
ISO 8601 | |
Alignment: | left |
Alias: | IS8601LZ |
Time Zone Informat: | Yes |
ISO 8601 Element: | 5.3.1.1 Complete representation |
Syntax | |
Syntax Description | |
Details | |
Examples | |
See Also |
Syntax |
E8601LZw.d |
specifies the width of the input field.
Default: | 14 |
Range: | 9-20 |
Requirement: | To read a time with the Z time zone indicator, the width of the input field must be 9 if data follows on the same line of data. |
specifies the number of digits to the right of the decimal point in the value for the lowest order component. This argument is optional.
Default: | 0 |
Range: | 0-6 |
Details |
UTC values specify a time and a time zone based on the zero meridian in Greenwich, England. The E8602LZ informat reads UTC time values that are specified in one of the following ISO 8601 extended time notations and return a SAS time value for the local time:
hh:mm:ss.ffffff+|-00:00 | |
hh:mm:ss.ffffffZ |
where
is a two-digit hour (zero padded), between 00 and 23
is a two-digit minute (zero padded), between 00 and 59
is a two-digit second (zero padded), between 00 and 59
are optional fractional seconds, with a precision of up to six digits, where each digit is between 0 and 9
indicate zero meridian or UTC time.
is an hour and minute signed offset from zero meridian or UTC time. Note that the offset must be +|-hh:mm (that is, + or - and five characters).
Use the + for time zones east of the zero meridian and use the - for time zones west of the zero meridian.
Restriction: | The shorter form +|-hh is not supported. |
When SAS reads a UTC time by using the E8601LZ informat and the adjusted time is greater than 24:00:00 or less than 00:00:00, SAS adjusts the time so that it represents a time between 00:00:00 and 24:00:00. For example, if SAS reads the UTC time 23:43:44-05:00 using the E8601LZ informat, SAS adds 5 hours to the time so that the value is 28:43:44, and then makes the time adjustment. The value stored represents the time 04:43:44+00:00.
Examples |
Data Line | Results |
---|---|
09:13:21+02:00 |
26001 |
23:43:44Z |
85424 |
See Also |
Reading Dates and Times Using the ISO 860 Basic and Extended Notations |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.