Previous Page | Next Page

Formats

E8601TZw.d Format



Adjusts time values to the Coordinated Universal Time (UTC) and writes them using the ISO 8601 extended notation hh:mm:ss+|-hh:mm.
Category: Date and Time
ISO 8601
Alignment: left
Alias: IS8601TZ
Time Zone Format: Yes
ISO 8601 Element: 5.3.1.1 Complete representation

Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

E8601TZw.d


Syntax Description

w

specifies the width of the output field.

Default: 14
Range: 9 - 20
d

specifies the number of digits to the right of the decimal point in the seconds value. This argument is optional.

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 E8602TZ format writes time values in one of the following ISO 8601 extended time notations:

hh:mm:ss+|-hh:mm

is the form used when w is large enough to support this time zone notation.

hh:mm:ssZ

is the form used when w is not large enough to support the +|- hh:mm time zone notation.

where

hh

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

mm

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

ss

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

Z

indicate 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 +|-hh:mm (that is, + or - and five characters). The shorter form +|-hh is not supported.

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

When SAS reads a UTC time by using the B8601TZ informat, and the adjusted time is greater than 24 hours or less than 00 hours, SAS adjusts the value so that the time is between 00:00:00 and 24:00:00. If the E8601TZ format attempts to format a time outside of this time range, the time is formatted with stars to indicate that the value is out of range.


Comparisons

For time values between 00:00:00 and 24:00:00, the E8601TZ format adjusts the time value to be the time at the zero meridian and writes it in the international standard extended time notation. The E8601LZ format makes no adjustment to the time and writes time values in the international standard extended time notation, using a UTC time zone offset for the local SAS session.


Examples

put etz e8601tz.;

Value of etz Results
73441
20:24:01+00:00
62641
17:24:01+00:00


See Also

Working with Dates and Times Using the ISO 8601 Basic and Extended Notations

Previous Page | Next Page | Top of Page