fn.hoursFromDateTime( arg as Date? ) as Number?
Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of $arg.
If $arg is the empty sequence, returns the empty sequence.
Parameters | |
---|---|
arg | The dateTime whose hours component will be returned. |
fn.hoursFromDateTime( xs.dateTime("1999-05-31T08:20:00-05:00")) => 8
fn.hoursFromDateTime( xs.dateTime("1999-12-31T21:20:00-05:00")) => 21
fn.hoursFromDateTime( fn.adjustDateTimeToTimezone( xs.dateTime("1999-12-31T21:20:00-05:00"), xs.dayTimeDuration("PT0H"))) => 2
fn.hoursFromDateTime( xs.dateTime("1999-12-31T12:00:00")) => 12
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.