# xs:dateTime

The lexical representation of `xs:dateTime`

consists of finite-length sequences of characters of the following form:

```
YYYY + "-" + MM + "-" +
DD + "T" + hh + ":"+
mm + ":" + ss + ("." + s)? +
(zzzzzz)?
```

Syntax | Description |
---|---|

YYYY | is a four-or-more digit optionally negative-signed numeral that represents the year; if more than four digits, leading zeros are prohibited, and '0000' is prohibited |

MM | is a two-digit numeral that represents the month |

DD | is a two-digit numeral that represents the day |

hh | is a two-digit numeral that represents the hour The value 24 is permitted if the minutes and seconds represented are zero, and the dateTime value so represented is the first instant of the following day (the hour property of a dateTime object in the value space cannot have a value greater than 23) |

mm | is a two-digit numeral that represents the minute |

ss | is a two-integer-digit numeral that represents the whole seconds |

s | represents the fractional seconds (optional) |

zzzzzz | represents the timezone |

The timezone portion zzzzzz is represented as follows:

`(("+" | "-") + hh + ":"+ mm) | "Z"`

Syntax | Description |
---|---|

"+"|"-" | "+" indicates a non-negative duration, "-" indicates a non-positive duration. |

hh | is a two-digit numeral (with leading zeros as required) that represents the hours |

mm | is a two-digit numeral that represents the minutes |

"Z" | "Z" represent the zero-length duration timezone, UTC "Z" is the canonical representation for UTC dateTime values. |

## DateTime Example

`2002-10-10T12:00:00-05:00`

(noon on 10 October 2002, Central Daylight Savings Time as well as Eastern Standard Time in the U.S.) is `2002-10-10T17:00:00Z`

, five hours later than `2002-10-10T12:00:00Z`

.