Converting and Working with Dates and Times
Mashable or mashup results frequently contain date or time data in various string formats. Sorting, filtering or performing calculations requires converting the string representations of the dates or times to an acceptable format for XPath, which uses XML Schema datatypes. These are based on ISO 8601 formats:
yyyy-MM-ddThh:mm:ss.s zzzzzz
In most cases, you can use the Presto custom XPath function ISODateFormatExt to convert dates or times to a string in the ISO format. Then use an XPath datatype function to cast the string to a date or time.
Note: | If your mashup script puts dates or times in variables, use the datetime datatype for the variable. The datetime datatype provides more reliable behavior than the date datatype which has been deprecated. |