Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn:seconds-from-dateTime

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

Summary

Returns an xs:decimal value between 0 and 60.999..., both inclusive representing the seconds and fractional seconds in the localized value of $arg. Note that the value can be greater than 60 seconds to accommodate occasional leap seconds used to keep human time synchronized with the rotation of the planet.

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

Parameters
arg The dateTime whose seconds component will be returned.

Example

fn:seconds-from-dateTime(
    xs:dateTime("1999-05-31T13:20:00-05:00"))
=> 0

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