MarkLogic 10 Product Documentation
sql:seconds

sql:seconds(
   $arg as xs:genericDateTimeArg?
) 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 time whose seconds component will be returned.

Example

sql:seconds(xs:time("13:20:10.5"))
=> 10.5

Example

sql:seconds("13:20:10.5")
=> 10.5

Example

sql.seconds("13:20:10.5")
=> 10.5
Powered by MarkLogic Server | Terms of Use | Privacy Policy