Easy Tutorial
❮ El Appinfo Schema Schema ❯

XSD Date and Time Data Types


Date and time data types are used to include date and time values.


Date Data Type

The date data type is used to define a date.

A date is defined using this format: "YYYY-MM-DD", where:

Note: All components are required.

Below is an example of a date declaration in a schema:

The element in the document should look like this:

Time Zone

If you need to specify a time zone, you can also input a date using Coordinated Universal Time (UTC) by appending a "Z" to the date, like this:

Or you can specify an offset from Coordinated Universal Time by appending a positive or negative time to the date, like this:


The time data type is used to define a time.

A time is defined using the following format: "hh:mm:ss", where:

Note: All components are required!

Below is an example of a time declaration in a schema:

The element in the document should look like this:

Or like this:

Time Zone

If you need to specify a time zone, you can also input a time using Coordinated Universal Time (UTC) by appending a "Z" to the time, like this:

Or you can specify an offset from Coordinated Universal Time by appending a positive or negative time to the time, like this:


DateTime Data Type

The dateTime data type is used to define a date and time.

A dateTime is defined using the following format: "YYYY-MM-DDThh:mm:ss", where:

Note: All components are required!

Below is an example of a dateTime declaration in a schema:

The element in the document should look like this:

Or like this:

Time Zone

If you need to specify a time zone, you can also input a dateTime using Coordinated Universal Time (UTC) by appending a "Z" to the dateTime, like this:

Or you can specify an offset from Coordinated Universal Time by appending a positive or negative time to the time, like this:


The duration data type is used to specify a time interval.

A time interval is specified using the following format: "PnYnMnDTnHnMnS", where:

Below is an example of a duration declaration in a schema:

The element in the document should look like this:

The above example represents a period of 5 years.

Or like this:

The above example represents a period of 5 years, 2 months, and 10 days.

Or like this:

The above example represents a period of 5 years, 2 months, 10 days, and 15 hours.

Or like this:

The above example represents a period of 15 hours.

Negative Duration

To specify a negative duration, enter a minus sign before P:

The above example represents a period of negative 10 days.


Date and Time Data Types

Name Description
date Defines a date value
dateTime Defines a date and time value
duration Defines a time interval
gDay Defines a part of the date - day (DD)
gMonth Defines a part of the date - month (MM)
gMonthDay Defines a part of the date - month and day (MM-DD)
gYear Defines a part of the date - year (YYYY)
gYearMonth Defines a part of the date - year and month (YYYY-MM)
time Defines a time value

Restrictions on Date Data Types

Restrictions that can be used with date data types:

❮ El Appinfo Schema Schema ❯