Author |
Message
|
RaviKrG |
Posted: Thu May 07, 2009 8:36 pm Post subject: Timestamp datetime parsing problem |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Hi, I have to convert CWF to XML for which I made a message set with two physical formats as cwf and xml and the flow is MQinput node -> RCD -> Compute -> MQOutput node.
All is fine but I face a problem for one of my fields which is TIMESTAMP of datetime type. When I change the TIMESTAMP type to string I get the proper output but when I set the type to datetime I get parsing error.
this is what I have tried. my incoming field have value as 20081111010101111 when type set to string then no problem but when type changed to datetime and the date format changed to YYYYMMDDHHMMSSZZZ then it gives parsing error as "Unable to parse value '20081111010101111' using format string 'yyyyMMddHHmmssZZZ'. Strict Datetime Checking = 1."
Now while searching I got this http://www.mqseries.net/phpBB2/viewtopic.php?t=42347 and after unchecking the strict datetime I get the same error as "Unable to parse value '20081111010101111' using format string 'yyyyMMddHHmmssZZZ'. Strict Datetime Checking = 0." Now again I got this http://www.mqseries.net/phpBB2/viewtopic.php?t=42235 but with no success even on taking trace I dont get much info.
Is there anything I am missing. Thanks for the help |
|
Back to top |
|
 |
RaviKrG |
Posted: Thu May 07, 2009 9:00 pm Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
forgot to mention
Mqinput node : message domain blob
RCD : message domain mrm
wmb version 6.1 on solaris and toolkit 6.1.0.3 on win |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri May 08, 2009 12:45 am Post subject: Re: Timestamp datetime parsing problem |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
RaviKrG wrote: |
my incoming field have value as 20081111010101111 when type set to string then no problem but when type changed to datetime and the date format changed to YYYYMMDDHHMMSSZZZ then it gives parsing error as "Unable to parse value '20081111010101111' using format string 'yyyyMMddHHmmssZZZ'. |
dateTime format patterns are case-sensitive. 'YYYYMMDDHHMMSSZZZ' != 'yyyyMMddHHmmssZZZ'.
'ZZZ' indicates a time zone offset. '111' does not look like a timezone offset.
Check the documentation for more details. |
|
Back to top |
|
 |
RaviKrG |
Posted: Fri May 08, 2009 1:22 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Thanks rekarm01, but now I seem to have some problems here with the data types as my message contains some fields which has of date type and I have changed the format to yyyymmdd and when I pass the data as 20081111 then I get the output as 2008-11-11. can I know why its so ? |
|
Back to top |
|
 |
RaviKrG |
Posted: Fri May 08, 2009 1:25 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
sorry for that I have changed to yyyyMMddHHmmssZZZ and not YYYYMMDDHHMMSSZZZ (it was a typing error) |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 08, 2009 1:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
RaviKrG wrote: |
can I know why its so ? |
That's the date format. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RaviKrG |
Posted: Fri May 08, 2009 1:56 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
right 2008-11-11 is the date format but since the date format in the message set is changed to yyyyMMdd then should it not take 20081111 as the date whats the whys its converting to 2008-11-11 or am i confusing something here |
|
Back to top |
|
 |
|