|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DFDL Date Type |
« View previous topic :: View next topic » |
Author |
Message
|
Dave Ziegler |
Posted: Fri Jun 06, 2014 8:28 am Post subject: DFDL Date Type |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
Can someone point me in the right direction, here? I'm not sure why my date is getting mangled.
Code: |
<xsd:element dfdl:calendarCheckPolicy="lax" dfdl:calendarPattern="MMddYYYY" dfdl:calendarPatternKind="explicit" name="FileDate" type="xsd:date"/>
|
Code: |
Jun 6, 2014, 10:34:41 AM
info: Offset: 28. Found delimited value: '06032014' for element 'FileDate'. The delimiter was '|'.
[dfdl = /MyFormat.xsd, scd = #xmlns(p="http://schemas.blah.com/MyFormat")xscd(/schemaElement::p:MyMessage/type::0/model::sequence/schemaElement::HeaderRecordMessage/type::0/model::sequence/schemaElement::FileDate), 101]
Jun 6, 2014, 10:34:41 AM
info: Offset: 36. The simple content region of element 'FileDate' was converted to logical value '2013-12-23Z'.
[dfdl = /MyFormat.xsd, scd = #xmlns(p="http://schemas.blah.com/MyFormat")xscd(/schemaElement::p:AccountBalanceFileMessage/type::0/model::sequence/schemaElement::HeaderRecordMessage/type::0/model::sequence/schemaElement::FileDate), 116]
|
Also, according to W3Schools, DD should indicate the day for XSD "date" type, but that appears to give me a Julian value in IIB. I'm sure there is an explanation for that as well, though  |
|
Back to top |
|
 |
Dave Ziegler |
Posted: Fri Jun 06, 2014 11:22 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2014 Posts: 118
|
In case this can help someone else, I changed my format string from MMddYYYY to MMddyyyy and now it is working. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 06, 2014 1:29 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I always check the date format against the implementation of the programming language. I don't trust the format mnemonics to be portable from one language to the other...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
shanson |
Posted: Tue Jun 10, 2014 11:11 pm Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
The DFDL calendar pattern language uses ICU's symbols. The symbols are explained in the DFDL 1.0 specification, but they are a subset of the full ICU set which is here http://www.icu-project.org/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html.
A typical US date should use MMddyyyy.
Remember that DFDL properties are about the physical rendering of the data. The parser applies the calendar pattern to the data and creates a logical calendar of the specified type. This is a standard XML Schema 1.0 types so will be xs:date, xs:time or xs:dateTime. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|