duration-from-parts

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Functions > Function Library Reference > lang | datetime functions >

duration-from-parts

Result is a duration calculated by combining the following parts supplied as arguments: year, month, day, hour, minute, second, millisecond, negative.

fn-dur-frpart

Durations are in the form P1Y2M3DT04H05M06.07S i.e. P(eriod) 1 Year, 2 Months, 3 Days, T(ime designator), 04 Hours, 05 Minutes, 06.07 seconds.milliseconds.

 

All of the arguments are of type xs:int except for millisecond, which is of type xs:decimal, and negative, which is of type xs:boolean (i.e. 1 for true, 0 for false). The duration parameter is of type xs:duration.

fn-dtDurParts

Parts: 1971 year, 11 month, 19 day, 11 hour, 05 minutes, 15.06 seconds, negative period "false".

 

Result:

duration="P1971Y11M19DT11H5M15.00006S"


© 2019 Altova GmbH