
fn:hours-from-time( $arg as xs:time? ) as xs:integer?
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. |
fn:hours-from-time(xs:time("11:23:00"))
=> 11
fn:hours-from-time(xs:time("21:23:00"))
=> 21
fn:hours-from-time(xs:time("01:23:00+05:00"))
=> 1
fn:hours-from-time(
fn:adjust-time-to-timezone(
xs:time("01:23:00+05:00"),
xs:dayTimeDuration("PT0H")))
=> 20
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.