subtract-dates
Returns the xs:dayTimeDuration that corresponds to the difference between the normalized value of date1 and the normalized value of date2.
Languages
XQuery, XSLT 2.0, XSLT 3.0.
Parameters
Name | Type | Description |
---|---|---|
date1 | xs:date | The first input value. |
date2 | xs:date | The second input value. |
Example
The mapping illustrated below subtracts two dates (2020-10-22 minus 2020-09-22). The result is the value P30D of type xs:dayTimeDuration., which represents a duration of 30 days.
