dateTime

Construct a dateTime from a date and time

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.

Parameters

Description

arg1:date()

the date

arg2:time()

the time

Examples

XPath

Results

dateTime(xs:date(‘2006-08-15’), xs:time(‘12:30:45-05:00’))

2006-08-15T12:30:45-05:00