ISO 8601 SAS Formats and Informats

SAS Formats for the Extended Format


Introduction

This set of SAS formats represents the ISO 8601 extended format. Each SAS format has a corresponding SAS informat that represents the extended format.


IS8601DA Format

Syntax: IS8601DA

Category: Date

ISO 8601 Element: 5.2.1.1 Complete representation

The IS8601DA format writes data values in the extended format YYYY-MM-DD, where

YYYY

is a four-digit year including century, for example, 2003.

MM

is a two-digit month (zero padded), for example, 01 is January.

DD

is a two-digit day of the month (zero padded), that is, 01 through 31.


IS8601DN Format

Syntax: IS8601DN

Category: Datetime

Time Zone: No

ISO 8601 Element: 5.2.1.1 Complete representation

The IS8601DN format writes datetime values with only a date portion in the extended format YYYY-MM-DD, where

YYYY

is a four-digit year including century, for example, 2003.

MM

is a two-digit month (zero padded), for example, 01 is January.

DD

is a two-digit day of the month (zero padded), that is, 01 through 31.


IS8601DT Format

Syntax: IS8601DT

Category: Datetime

Time Zone: No

ISO 8601 Element: 5.4.1 Complete representation

The IS8601DT format writes datetime values in the extended format YYYY-MM-DDThh:mm:ss[.fffff], where

YYYY

is a four-digit year including century, for example, 2003.

MM

is a two-digit month (zero padded), for example, 01 is January.

DD

is a two-digit day of the month (zero padded), that is, 01 through 31.

T

is a required capital letter T to indicate the beginning of the time element.

hh

is a two-digit hour (zero padded), that is, 00 through 23.

mm

is a two-digit minute (zero padded), that is, 00 through 59.

ss

is a two-digit second (zero padded), that is, 00 through 59.

.fffff

are optional fractional seconds.


IS8601DZ Format

Syntax: IS8601DZ

Category: Datetime

Time Zone: Yes

ISO 8601 Element: 5.4.1 Complete representation

The IS8601DZ format writes datetime values with a time zone in the extended format YYYY-MM-DDThh:mm:ss[.fffff][Z]|[[+|-]hh:mm], where

YYYY

is a four-digit year including century, for example, 2003.

MM

is a two-digit month (zero padded), for example, 01 is January.

DD

is a two-digit day of the month (zero padded), that is, 01 through 31.

T

is a required capital letter T to indicate the beginning of the time element.

hh

is a two-digit hour (zero padded), that is, 00 through 23.

mm

is a two-digit minute (zero padded), that is, 00 through 59.

ss

is a two-digit second (zero padded), that is, 00 through 59.

.fffff

are optional fractional seconds.

Z

is an optional capital letter Z to indicate Universal Coordinated Time.

+|-hh:mm

is an optional hour and minute signed offset from UTC base. Note that the offset must be +|-hh:mm (that is, + or - and five characters). The shorter form +|-hh is not supported.


IS8601LZ Format

Syntax: IS8601LZ

Category: Time

Time Zone: Yes. The format appends the UTC offset to the value as determined by the local SAS session.

ISO 8601 Element: 5.3.1.1 Complete representation

The IS8601LZ format writes time values with a time zone in the extended format hh:mm:ss[.fffff][Z][+|-]hh:mm], where

hh

is a two-digit hour (zero padded), that is, 00 through 23.

mm

is a two-digit minute (zero padded), that is, 00 through 59.

ss

is a two-digit second (zero padded), that is, 00 through 59.

.fffff

are optional fractional seconds.

Z

is an optional capital letter Z to indicate Universal Coordinated Time.

+|-hh:mm

is an optional hour and minute signed offset from UTC base. Note that the offset must be +|-hh:mm (that is, + or - and five characters). The shorter form +|-hh is not supported.


IS8601TM Format

Syntax: IS8601TM

Category: Time

Time Zone: No

ISO 8601 Element: 5.3.1.1 Complete representation and 5.3.1.3 Representation of decimal fractions

The IS8601TM format writes time values in the extended format hh:mm:ss[.fffff], where

hh

is a two-digit hour (zero padded), that is, 00 through 23.

mm

is a two-digit minute (zero padded), that is, 00 through 59.

ss

is a two-digit second (zero padded), that is, 00 through 59.

.fffff

are optional fractional seconds.


IS8601TZ Format

Syntax: IS8601TZ

Category: Time

Time Zone: Yes

ISO 8601 Element: 5.3.1.1 Complete representation

The IS8601TZ format writes time values with a time zone in the extended format hh:mm:ss[.fffff][Z][+|-]hh:mm], where

hh

is a two-digit hour (zero padded), that is, 00 through 23.

mm

is a two-digit minute (zero padded), that is, 00 through 59.

ss

is a two-digit second (zero padded), that is, 00 through 59.

.fffff

are optional fractional seconds.

Z

is an optional capital letter Z to indicate Universal Coordinated Time.

+|-hh:mm

is an optional hour and minute signed offset from UTC base. Note that the offset must be +|-hh:mm (that is, + or - and five characters). The shorter form +|-hh is not supported.

space
Previous Page | Next Page | Top of Page