ISO 8601 SAS Formats and Informats

SAS Informats for the Extended Format


Introduction

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


IS8601DA Informat

Syntax: IS8601DA

Category: Date

ISO 8601 Element: 5.2.1.1 Complete representation

The IS8601DA informat reads date values into a variable 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 Informat

Syntax: IS8601DN

Category: Datetime

Time Zone: No

ISO 8601 Element: 5.2.1.1 Complete representation

The IS8601DN informat reads datetime values with only a date portion into a variable 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 Informat

Syntax: IS8601DT

Category: Datetime

Time Zone: No

ISO 8601 Element: 5.4.1 Complete representation

The IS8601DT informat reads datetime values into a variable 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 Informat

Syntax: IS8601DZ

Category: Datetime

Time Zone: Yes

ISO 8601 Element: 5.4.1 Complete representation

The IS8601DZ informat reads datetime values with a time zone into a variable 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 Informat

Syntax: IS8601LZ

Category: Time

Time Zone: Yes

ISO 8601 Element: 5.3.1.1 Complete representation

The IS8601LZ informat reads time values with a time zone into a variable 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 Informat

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 informat reads time values into a variable 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 Informat

Syntax: IS8601TZ

Category: Time

Time Zone: Yes

ISO 8601 Element: 5.3.1.1 Complete representation

The IS8601TZ informat reads time values with a time zone into a variable 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