$N8601EXw.d Format

Writes ISO 8601 duration, datetime, and interval forms by using the extended notations Pyyyy-mm-ddThh:mm:ss and yyyy-mm-ddThh:mm:ss, using an x for each digit of an omitted component.
Categories: Date and Time

ISO 8601

Alignment: left
Restriction: UTC time zone offset values are not supported.
Supports: ISO 8601 Elements 5.5.3, 5.5.4.1, and 5.5.4.2

Syntax

$N8601EXw.d

Syntax Description

w
specifies the width of the output 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 lowest-order component. This argument is optional.
Default:0
Range:0–3

Details

The $N8601EX format writes ISO 8601 duration, datetime, and interval values as character data, using a hyphen ( - ) to represent omitted components, for the following extended notations:
  • Pyyyy-mm-ddThh:mm:ss
  • yyyy-mm-ddThh:mm:ss
  • Pyyyy-mm-ddThh:mm:ss/yyyy-mm-ddThh:mm:ss
  • yyyy-mm-ddThh:mm:ss/Pyyyy-mm-ddThh:mm:ss
  • yyyy-mm-ddThh:mm:ss/yyyy-mm-ddThh:mm:ss
Omitted datetime components are always displayed; they are never truncated.

Example

put nex $n8601ex.;
Value of nex
Result
00023FFFFFFFFFFC2012FFF15FFFFFFD
P0002-03xxTxx:xx:xx/2012–xx-xxT15:xx:xx
2012FFF15FFFFFFdFFFF3FF1553FFFFC
2012-xx-xxT15:xx:xx/Pxxxx-03-xxT15:53:xx