MarkLogic Server 11.0 Product Documentation
fn:hours-from-time

fn:hours-from-time(
   $arg as xs:time?
) as xs:integer?

Summary

Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.

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

Parameters
arg The time whose hours component will be returned.

Example

fn:hours-from-time(xs:time("11:23:00"))
=> 11

Example

fn:hours-from-time(xs:time("21:23:00"))
=> 21

Example

fn:hours-from-time(xs:time("01:23:00+05:00"))
=> 1

Example

fn:hours-from-time(
    fn:adjust-time-to-timezone(
         xs:time("01:23:00+05:00"),
         xs:dayTimeDuration("PT0H")))
=> 20
Powered by MarkLogic Server | Terms of Use | Privacy Policy