Loading TOC...

MarkLogic 12 EA 2 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.

28 functions
Function name Description
fn.adjustDateTimeToTimezone Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.
fn.adjustDateToTimezone Adjusts an xs:date value to a specific timezone, or to no timezone at all.
fn.adjustTimeToTimezone 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.dayFromDate Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.
fn.dayFromDateTime Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.
fn.daysFromDuration Returns an xs:integer representing the days component in the canonical lexical representation of the value of $arg.
fn.formatDate Returns a formatted date value based on the picture argument.
fn.formatDateTime Returns a formatted dateTime value based on the picture argument.
fn.formatTime Returns a formatted time value based on the picture argument.
fn.hoursFromDateTime Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of $arg.
fn.hoursFromDuration Returns an xs:integer representing the hours component in the canonical lexical representation of the value of $arg.
fn.hoursFromTime Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.
fn.minutesFromDateTime Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg.
fn.minutesFromDuration Returns an xs:integer representing the minutes component in the canonical lexical representation of the value of $arg.
fn.minutesFromTime 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.monthFromDate Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.
fn.monthFromDateTime Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.
fn.monthsFromDuration Returns an xs:integer representing the months component in the canonical lexical representation of the value of $arg.
fn.secondsFromDateTime 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.secondsFromDuration Returns an xs:decimal representing the seconds component in the canonical lexical representation of the value of $arg.
fn.secondsFromTime 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.timezoneFromDate Returns the timezone component of $arg if any.
fn.timezoneFromDateTime Returns the timezone component of $arg if any.
fn.timezoneFromTime Returns the timezone component of $arg if any.
fn.yearFromDate Returns an xs:integer representing the year component in the localized value of $arg.
fn.yearFromDateTime Returns an xs:integer representing the year component in the localized value of $arg.
fn.yearsFromDuration Returns an xs:integer representing the years component in the canonical lexical representation of the value of $arg.