Name
xs:dateTime
Facets
xs:enumeration ,
xs:maxExclusive , xs:maxInclusive , xs:minExclusive , xs:minInclusive , xs:pattern , xs:whiteSpace |
The xs:dateTime
type
combines Gregorian calendar dates with times. Its contents appear
in the format CCYY
-
MM
-
DD
T
hh
:
mm
:
ss
, where
CC
is the century,
YY
is the year (00–99),
MM
is the month (01–12),
DD
is the day (01–31),
hh
is the hour (00–23),
mm
is the minute (00–59), and
ss
is the second (00–59, plus an
optional decimal part). For years before 1, a negative sign may
appear before the century. Acceptable xs:dateTime
values include 1999-11-25T04:03:20
, -0044-03-15T12:00:00
, and 2020-01-01T18:47:49
.
A time zone relative to Coordinated Universal Time, also
known as Greenwich Time or UTC, may also be added. If there is a
time zone, the format is ± hh:mm
, wherein a plus or minus sign is
followed by a two-digit value for hours, then a colon, and then a
two-digit value for minutes. You can also use Z
in place of the time zone, indicating
UTC. Valid date/time combinations with a time zone include
1999-11-25T04:03:20+05:00
,
-0044-03-15T12:00:00-10:30
, and
2020-01-01T18:47:49Z
.
Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.