xdmp:parse-yymmdd( $picture as xs:string, $value as xs:string, [$language as xs:string?], [$calendar as xs:string?], [$country as xs:string?] ) as xs:dateTime
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. |
xdmp:parse-yymmdd("yyyy-MM-ddThh:mm:ss.Sz", "2014-01-06T17:13:50.873594-8.00") => 2014-01-06T17:13:50.874-08:00
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.