fn:seconds-from-duration

fn:seconds-from-duration(
   $arg as xs:duration?
) as xs:decimal?

Summary

Returns an xs:decimal representing the seconds component in the canonical lexical representation of the value of $arg. The result may be negative.

If $arg is the empty sequence, returns the empty sequence.

Parameters
arg The duration whose minute component will be returned.

Example

fn:seconds-from-duration(xs:duration("P3DT10H12.5S"))
=> 12.5

Example

fn:seconds-from-duration(xs:duration("-PT256S"))
=> -16.0
Powered by MarkLogic Server | Terms of Use | Privacy Policy