Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn functions (DurationDateTime)

The duration, date, and time built-in functions are XQuery functions that operate on duration-, date-, and time-related values. They are defined in XQuery 1.0 and XPath 2.0 Functions and Operators.

30 functions
Function name Description
fn:adjust-date-to-timezone Adjusts an xs:date value to a specific timezone, or to no timezone at all.
fn:adjust-dateTime-to-timezone Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.
fn:adjust-time-to-timezone Adjusts an xs:time value to a specific timezone, or to no timezone at all.
fn:dateTime Returns an xs:dateTime value created by combining an xs:date and an xs:time.
fn:day-from-date Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.
fn:day-from-dateTime Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.
fn:days-from-duration Returns an xs:integer representing the days component in the canonical lexical representation of the value of $arg.
fn:format-date Returns a formatted date value based on the picture argument.
fn:format-dateTime Returns a formatted dateTime value based on the picture argument.
fn:format-time Returns a formatted time value based on the picture argument.
fn:hours-from-dateTime Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of $arg.
fn:hours-from-duration Returns an xs:integer representing the hours component in the canonical lexical representation of the value of $arg.
fn:hours-from-time Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.
fn:minutes-from-dateTime Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg.
fn:minutes-from-duration Returns an xs:integer representing the minutes component in the canonical lexical representation of the value of $arg.
fn:minutes-from-time Returns an xs:integer value between 0 to 59, both inclusive, representing the value of the minutes component in the localized value of $arg.
fn:month-from-date Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.
fn:month-from-dateTime Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.
fn:months-from-duration Returns an xs:integer representing the months component in the canonical lexical representation of the value of $arg.
fn:seconds-from-dateTime Returns an xs:decimal value between 0 and 60.999..., both inclusive representing the seconds and fractional seconds in the localized value of $arg.
fn:seconds-from-duration Returns an xs:decimal representing the seconds component in the canonical lexical representation of the value of $arg.
fn:seconds-from-time Returns an xs:decimal value between 0 and 60.999..., both inclusive, representing the seconds and fractional seconds in the localized value of $arg.
fn:subtract-dateTimes-yielding-dayTimeDuration [0.9-ml only, use the minus operator ( - ) instead] Returns the xdt:dayTimeDuration that corresponds to the difference between the normalized value of $srcval1 and the normalized value of $srcval2.
fn:subtract-dateTimes-yielding-yearMonthDuration [0.9-ml only, use the minus operator ( - ) instead] Returns the xdt:yearMonthDuration that corresponds to the difference between the normalized value of $srcval1 and the normalized value of $srcval2.
fn:timezone-from-date Returns the timezone component of $arg if any.
fn:timezone-from-dateTime Returns the timezone component of $arg if any.
fn:timezone-from-time Returns the timezone component of $arg if any.
fn:year-from-date Returns an xs:integer representing the year component in the localized value of $arg.
fn:year-from-dateTime Returns an xs:integer representing the year component in the localized value of $arg.
fn:years-from-duration Returns an xs:integer representing the years component in the canonical lexical representation of the value of $arg.