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 TypeName | Type | Description |
$arg1 |
xs:date? |
the date |
$arg2 |
xs:time? |
the time |
return value |
xs:dateTime? |
ExamplesXPath Example | Results |
---|
dateTime(xs:date('2006-08-15'),
xs:time('12:30:45-05:00')) |
2006-08-15T12:30:45-05:00 |
History |
Recommended Reading:
|