$N8601BAw.d Format

Writes ISO 8601 duration, datetime, and interval forms by using the basic notations PyyyymmddThhmmss and yyyymmddThhmmss.
Categories: Date and Time

ISO 8601

Alignment: left
Restriction: UTC time zone offset values are not supported.
Supports: IS0 8601 Element 5.5.4.2, alternative format

Syntax

$N8601BAw.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 $N8601BA format writes ISO 8601 duration, datetime, and interval values as character data for the following basic notations:
  • PyyyymmddThhmmss
  • yyyymmddThhmmss
  • PyyyymmddThhmmss/yyyymmddThhmmss
  • yyyymmddThhmmss/PyyyymmddThhmmss
The lowest-order component can contain fractions, as in these examples:
  • p00023.5
  • 00020304T05.335

Example

put @1 nba $N8601ba.;
Value of nba
Result
00024050501127D0
P00020405T050112.5
2012915155300FFD
20120915T155300
00023040506075282012915155300FFD
P00020304T050607.33/20120915T155300