Loading TOC...

fn.secondsFromDuration

fn.secondsFromDuration(
   $arg as xs.duration?
) as Number?

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.secondsFromDuration(xs.duration("P3DT10H12.5S"));
=> 12.5

Example

fn.secondsFromDuration(xs.duration("-PT256S"));
=> -16.0

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.