I am trying to convert a string to date in Altova StyleVision using an Xpath Expression but I am getting this error.
Error in XPath 2.0 expression
Line 358, Character 32
(Cast failed, invalid lexical value - xs:dateTime '2017-16-09T12:16:59.407+03:00')
My expression is below.
format-dateTime(xs:dateTime('2017-16-09T12:16:59.407+03:00'), '[Y0001]/[M01]/[D01]')
Any help will be highly appreciated.
It's an unhelpful error message. Saxon does better:
The problem is that there is no month 16.