Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

xs:dateTime

Construct a dateTime value from an item value.


Syntax

xs:dateTime(item $value) => dateTime

Top of page

Description

This is a constructor function that takes an item value as argument and returns a value of type xs:dateTime. If the argument is a literal, then the literal must be a valid lexical form of its type.

As specified in the respective section of the W3C recommendation XML Schema Part 2: Datatypes, a value of type xs:dateTime represents a specific instant of time by a combination of date and time of day values. The lexical form is CCYY-MM-DDThh:mm:ss where "CC" represents the century, "YY" the year, "MM" the month and "DD" the day. It can be preceded by an optional leading minus sign to indicate a negative number . You may not truncate digits on the left side. The letter "T" separates date from time and "hh", "mm", "ss" represent hour, minute and second. Fractions of a second are appended with a leading ".".

A datetime value may include a time zone which is either a capital "Z" to denote Coordinated Universal Time (UTC), or it is a value whose lexical form is hh:mm, preceded by a minus or plus sign to indicate the difference from UTC.

Top of page

Argument

$value

item value

Top of page

Example

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page