Loading TOC...

fn.hoursFromTime

fn.hoursFromTime(
   $arg as String?
) as Number?

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.hoursFromTime(xs.time("11:23:00"))
=> 11

Example

fn.hoursFromTime(xs.time("21:23:00"))
=> 21

Example

fn.hoursFromTime(xs.time("01:23:00+05:00"))
=> 1

Example

fn.hoursFromTime(
    fn.adjustTimeToTimezone(
         xs.time("01:23:00+05:00"),
         xs.dayTimeDuration("PT0H")))
=> 20

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy