home contribute faq download

FunctX XQuery Functions

fn:dateTime

Construct a dateTime from a date and time

Google
Webxqueryfunctions.com

Description

The fn:dateTime function constructs an xs:dateTime value from an xs:date value and an xs:time value. It should not be confused with the xs:dateTime constructor, which accepts a single argument that includes the date and time.

Time zone is taken into account when constructing the date/time. If neither the date nor the time has a time zone, the result has no time zone. If only one of the arguments has a time zone, or they both have the same time zone, the result has that time zone.

This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book.

Arguments and Return Type

NameTypeDescription
$arg1 xs:date? the date
$arg2 xs:time? the time
return value xs:dateTime?

Examples

XQuery ExampleResults
dateTime(xs:date('2006-08-15'),
            xs:time('12:30:45-05:00'))
2006-08-15T12:30:45-05:00

History

Published OnLast UpdatedContributor(s)
2006-07-232007-02-25W3C, XQuery 1.0 and XPath 2.0 Functions and Operators, http://www.w3.org/TR/xpath-functions/
Datypic XQuery Services

Recommended Reading:

XQuery