Loading TOC...

xdmp.parseYymmdd

xdmp.parseYymmdd(
   $picture as String,
   $value as String,
   [$language as String?],
   [$calendar as String?],
   [$country as String?]
) as Date

Summary

Parses a string containing date, time or dateTime using the supplied picture argument and returns a dateTime value. While this function is closely related to other XSLT functions, it is available in XSLT as well as in all XQuery dialects and in Server-Side JavaScript.

Parameters
$picture The desired string representation of the given $value. This follows the specification of picture string which is compatible to the format specification in icu. See http://icu-project.org/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html for more details.

The following is the summary of the formatting symbols:


     Symbol     Description
  ----------------------------
     "y"       year(absolute value)
     "M"       month in year
     "d"       day in month
     "D"       day in year
     "E"       day of week
     "w"       week in year
     "W"       week in month
     "H"       hour in day
     "K"       hour in half-day
     "a"       am/pm marker
     "s"       second in minute
     "S"       fractional seconds
     "Z"       timezone as a time offset from UTC
               for example PST
     "ZZZZ"    timezone as an offset using GMT,
               for example GMT+1

             

$value The given string $value that needs to be formatted.
$language The language used in string representation of the date, time or dateTime value.
$calendar This argument is reserved for future use. The only calendar supported at this point is "Gregorian" or "AD".
$country $country is used to take into account if there any country specific interpretation of the string while converting it into dateTime value.

Usage Notes

Dates before October 15, 1582 (the start of the Gregorian calendar) will not return the correct dateTime value.

Example

   xdmp.parseYymmdd("yyyy-MM-ddThh:mm:ss.Sz",
      "2014-01-06T17:13:50.873594-8.00")
   =>
   2014-01-06T17:13:50.874-08:00
 

Comments

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