In java when using SimpleDateFormat with a template:
yyyy-MM-dd'T'HH:mm:ss.SSSZ
date is displayed as:
"2002-02-01T18:18:42.703-0700"
In xquery, when using the xs: dateTime function, it throws an error:
"Invalid lexical value [err:FORG0001]"
with the specified date. For proper xquery analysis, the date should look like this:
"2002-02-01T18:18:42.703-07:00" - node the ':' 3rd position from end of string
which is based on ISO 8601, while the Java date is based on the RFC 822 standard.
I would like to be able to easily specify the timezone in Java so that it displays what xquery wants.
Thank!
Mark
source
share