Altova MapForce 2023 Professional Edition

Returns the xs:duration value obtained by subtracting duration2 from duration1.


An example duration is P1Y2M3DT04H05M59S, where:


"P" is the period designator, and is mandatory;

The rest of the characters denote, in this order: 1 Year, 2 Months, 3 Days, T (Time designator), 04 Hours, 05 Minutes, 59 Seconds.


If the minus character appears before the "P" designator, this indicates a negative duration, for example: -P1D.




Built-in, C++, C#, Java.



If duration1 is P0Y0M0DT05H07M (5 hours and 7 minutes) and duration2 is PT1H (1 hour), the function returns PT4H7M (4 hours and 7 minutes).

© 2016-2022 Altova GmbH