specifies a number that represents the number of years, months, or days
indicates that the duration that follows is specified by the number of years, months, days, hours, minutes, and seconds
indicates that a time value follows. Any value with a time must begin with T.
Requirement | Time values that are read by the extended notation informats that begin with the characters E8601 must use an uppercase T. |
indicates that the duration is specified in weeks.
indicates that the time value is the time in Greenwich, England, or UTC time.
the + indicates the time zone offset to the east of Greenwich, England. The - indicates the time zone offset to the west of Greenwich, England.
specifies a four-digit year
as part of a date, specifies a two-digit month, 01–12
specifies a two-digit day, 01–1
specifies a two-digit hour, 00–24
as part of a time, specifies a two-digit minute, 00–59
specifies a two-digit second, 00–59
specifies an optional fraction of a second using the digits 0–9:
fff | use 1 - 3 digits for values read by the $N8601B informat and the $N8601E informat |
ffffff | use 1 - 6 digits for informat other than the $N8601B informat and the $N8601E informat |
indicates that a year value precedes this character in a duration
as part of a date, indicates that a month value precedes this character in a duration
indicates that a day value precedes this character in a duration
indicates that an hour value precedes this character in a duration
as part of a time, indicates that a minute value precedes this character in a duration
indicates that a seconds value precedes this character in a duration
Date, Time, or Datetime
|
ISO 8601 Notation
|
Example
|
Informat
|
---|---|---|---|
Basic Notations
|
|||
Date
|
YYYYMMDD
|
20130915
|
B8601DAw.
|
Time with no time zone
offset
|
hhmmssnnnnnn
|
155300322348
|
B8601TMw.d
|
Time with a time zone
offset
|
hhmmss+|–hhmm
|
155300–0500
|
B8601TZw.d
|
hhmmssZ
|
155300Z
|
B8601TZw.d
|
|
Convert to local time
with a time zone offset
|
hhmmss+|–hhmm
|
155300+0500
|
B8601TZw.d
|
Datetime with no time
zone offset
|
yyyymmddThhmmssnnnnnn
|
20130915T155300
|
B8601DTw.d
|
Datetime with a time
zone offset
|
yyyymmddThhmmss+|–hhmm
|
20130915T155300+0500
|
B8601DZw.d
|
|
yyyymmddThhmmssZ
|
20130915T155300Z
|
B8601DZw.d
|
Date from a datetime
and no time zone offset
|
yyyymmdd
|
20130915
|
B8601DNw.
|
Extended Notations
|
|||
Date
|
yyyy-mm-dd
|
2013-09-15
|
E8601DAw.
|
Time with no time zone
offset
|
hh:mm:ss.nnnnnn
|
15:53:00.322348
|
E8601TMw.d
|
Time with a time zone
offset
|
hh:mm:ss.nnnnnn+|–hh:mm
|
15:53:00+05:00
|
E8601TZw.d
|
Convert to local time
with a time zone offset
|
hh:mm:ss.nnnnnn+|–hh:mm
|
15:53:00+05:00
|
E8601LZw.d
|
Datetime with no time
zone offset
|
yyyy-mm-ddThh:mm:ss.nnnnnn
|
2013-09-15T15:53:00
|
E8601DTw.d
|
Datetime with a time
zone offset
|
yyyy-mm-ddThh:mm:ss.nnnnnn+|–hh:mm
|
2013-09-15T15:53:00+05:00
|
E8601DZw.d
|
Date from a datetime
and no time zone offset
|
yyyy-mm-dd
|
2013-09-15
|
E8601DNw.
|
Time Component
|
ISO 8601 Notation
|
Example
|
---|---|---|
Duration - Basic Notation
|
PYYYYMMDDThhmmss
|
P20120915T155300
|
|
–PYYYYMMDDThhmmss
|
–P20080915T155300
|
Duration - Extended
Notation
|
PYYYY-MM-DDThh:mm:ss
|
P2012-09-15T15:53:00
|
|
–PYYYY-MM-DDThh:mm:ss
|
–P2012-09-15T15:53:00
|
Duration - Basic and
Extended Notation
|
PnYnMnDTnHnMnS
|
P2y10m14dT20h13m45s
|
|
–PnYnMnDTnHnMnS
|
–P2n10m14dT20h13m45s
|
|
PnW (weeks)
|
P6w
|
Interval - Basic Notation
|
YYYYMMDDThhmmss/YYYYMMDDThhmmss
|
20120915T155300/20141113T000000
|
|
PnYnMnDTnHnMnS/YYYYMMDDThhmmss
|
P2y10M14dT20h13m45s/20120915T155300
|
|
YYYYMMDDThhmmss/PnYnMnDTnHnMnS
|
20120915T155300/P2y10M14dT20h13m45s
|
Interval- Extended Notation
|
YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
|
2012-09-15T15:53:00/2014-11-13T00:00:00
|
|
PnYnMnDTnHnMnS/YYYY-MM-DDThh:mm:ss
|
P2y10M14dT20h13m45s/2012-09-15T15:53:00
|
|
YYYY-MM-DDThh:mm:ss/PnYnMnDTnHnMnS
|
2012-09-15T15:53:00/P2y10M14dT20h13m45s
|
Datetime-Basic Notation
|
YYYYMMDDThhmmss.fff+|–hhmm
|
20120915T155300
|
|
(all blank)
|
|
Datetime-Extended Notation
|
YYYY-MM-DDThh:mm:ss.fff+|–hhmm
|
2012-09-15T15:53:00
+04:30
|
|
(all blank)
|
|
p0003-02--T10:31:33
–p0003-02-02T-:31:33
x-09-15T15:x:x
2012-09-15T15:x:00/2010-09-15T15:x:00
p00030202T1031
2012-09-15T15/2014-09-15T15:53
–p0003-03-03T-:-:-
P2y3m4dT5h6m
2012-09-xTx:x:x
2012
Duration
|
Extended Normalized
Duration
|
---|---|
p3y13m |
p0004-01 |
pt24h24m65s |
P----01T-:25:05 |
p3y13mT24h61m |
P0004-01-01T01:01 |
p0004-13 |
p0005-01 |
p0003-02-61T15:61:61 |
P0003-04-01T16:02:01 |
p13m |
P13M |
pT12:60:13
becomes PT13:-:13
.