Previous Page | Next Page

Informats

$N8601Ew.d Informat



Reads ISO 8601 duration, datetime, and interval values that are specified in the extended notation.
Category: Date and Time
ISO 8601
Alignment: left
Time Zone Informat: No
ISO 8601 Element: 5.4.4 Complete representation

Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

$N8601Ew.d


Syntax Description

w

specifies the width of the input field.

Default: 50
Range: 1 - 200
Requirement: The minimum length for a duration value or a datetime value is 16. The minimum length for an interval value is 16.
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 - 3

Details

The $N8601E informat reads ISO 8601 durations, datetime, and interval values that can be specified in the following the extended notations:

Time Component ISO 8601 Notation Example
Duration Pyyyy-mm-ddThh:mm:ss.fff P2008-09-15T15:53:00

PnW P6w
Interval yyyy-mm-ddThh:mm:ss.fff/yyyy-mm-ddThh:mm:ss.fff 2008-09-15T15:53:00/2010-11-13T00:00:00

yyyy-mm-ddThh:mm:ss.fff/PnYnMnDTnHnMns.fffS 2008-09-15T15:53:00/P2y10M14dT20h13m45s
Datetime yyyy-mm-ddThh:mm:ss.fff 2008-09-15T15:53:00

n

specifies a number that represents the number of years, months, or days

P

is the character that is used to indicate that the duration that follows is specified by the number of years, months, days, hours, minutes, and seconds

W

is the character that is used to designate that the duration is specified in weeks.

T

is the character used to designate that a time value follows. If all time values are 0, T is not required.

yyyy

specifies a four-digit year

mm

specifies a two-digit month, 01 - 12

dd

specifies a two-digit day, 01 - 31

hh

specifies a two-digit hour, 00 - 23

mm

specifies a two-digit minute, 00 - 59

ss

specifies a two-digit second, 00 - 59

fff

specifies an optional fraction of a second that can be 1 - 3 digits, 0 - 9

Y

is the character that is used to designate years in a duration

M

is the character used to designate months in a duration

D

is the character used to designate days in a duration

H

is the character used to designate hours in a duration

S

is the character used to designate minutes in a duration

S

is the character used to designate seconds in a duration


Comparisons

The $N8601E informat reads only valid durations, intervals, and datetimes that are specified in the extended notation. The $N8601B informat reads valid durations, intervals, and datetimes that are specified in either the basic or extended notation. Use the $N8601E informat when you need to ensure compliance with the extended notation.


Examples

input @1 i860 $n8601e.;

Data Line Results
p0002-04-05t5:1:12s
0002405050112FFC
2008-09-15T15:53:00/2010-09-15T00:00:00
2008915155300FFD2010915000000FFD
p0033-01-04T3:2:55/2008-09-15T15:53:00
0033104030255FFC2008915155300FFD


See Also

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

Previous Page | Next Page | Top of Page