Previous Page | Next Page

Informats

B8601TZw.d Informat



Reads time values that are specified in the ISO 8601 basic time notation hhmmssfffff+|-hhmm or hhmmssffffffZ.
Category: Date and Time
ISO 8601
Alignment: left
Alias: ND8601TZ
Time Zone Informat: Yes
ISO 8601 Element: 5.3.1.1 Complete representation

Syntax
Syntax Description
Details
Examples
See Also

Syntax

B8601TZw.d


Syntax Description

w

specifies the width of the input field.

Default: 14
Range: 9-20
d

(optional) specifies the number of digits to the right of the decimal point in the seconds value.

Default: 0
Range: 0 - 6

Details

UTC time values specify a time and a time zone based on the zero meridian in Greenwich, England. The B8602TZ informat reads time values that are specified in the following ISO 8601 basic time notations:

hhmmssffffff+|-hhmm

hhmmssffffffZ

where

hh

is a two-digit hour (zero padded), between 00 and 23

mm

is a two-digit minute (zero padded), between 00 and 59

ss

is a two-digit second (zero padded), between 00 and 59

ffffff

are optional fractional seconds, with a precision of up to six digits, where each digit is between 0 and 9

Z

indicates that the time is for zero meridian (Greenwich, England) or UTC time

+|-hh:mm

is an hour and minute signed offset from zero meridian time. Note that the offset must be +|-hhmm (that is, + or - and four characters).

Use + for time zones east of the zero meridian and use - for time zones west of the zero meridian. For example, +0200 indicates a two hour time difference to the east of the zero meridian, and -0600 indicates a six hour time differences to the west of the zero meridian.

Restriction: The shorter form +|-hh is not supported.

When SAS reads a UTC time by using the B8601TZ informat and the adjusted time is greater than 240000 or less than 000000, SAS adjusts the time so that it represents a time between 000000 and 240000. For example, if SAS reads the UTC time 234344-0500 using the B8601TZ informat, SAS adds five hours to the time so that the value is 284344, and then makes the time adjustment. The value stored represents the time 044344+0000.


Examples

input @1 btz b8601tz.;

Data Line Results
----+----1

202401-0500
5041
202401Z
73441
202401+0000
73441


See Also

Reading Dates and Times Using the ISO 860 Basic and Extended Notations

Previous Page | Next Page | Top of Page