|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Message Broker - Mapping |
« View previous topic :: View next topic » |
Author |
Message
|
HIMAGAR |
Posted: Mon Nov 09, 2015 8:02 am Post subject: Message Broker - Mapping |
|
|
Novice
Joined: 05 Nov 2015 Posts: 18
|
I have been using the Mapping node to data from a XML file,
and trying to map with to a field which is a string to a value which is of DateType using the cast function (xs:DateTime($exp))
Any suggestions, on how to resolve this?
String (Source side):
"2015-06-05"
Need to convert to :
2015-06-05T00:00:00+0000
I am using concat function to do this.
fn:concat($source/msg_date,'T00:00:00+0000'),
but i am not getting "2015-06-05T00:00:00+0000" as output, I am getting "2015-06-05 00:00:00+0000".So, where my "T" is going..
Instead if I use anything else other than "T", it does not creates issue while concatination.
Please suggest.
regards,
HIMAGAR |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 09, 2015 8:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
it doesn't work if you simply cast the string to a date/datetime with the correct pattern? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
HIMAGAR |
Posted: Mon Nov 09, 2015 8:21 am Post subject: |
|
|
Novice
Joined: 05 Nov 2015 Posts: 18
|
No...
xs:cast function eats my "T"...
as a result it fails in the validation against my XSD..
I have a dateTime Field in my XSD
xs:DateTime(fn:concat($source/msg_date,'T00:00:00+0000'))
Output : 2015-06-05 00:00:00+0000
Regards,
HIMAGAR |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 09, 2015 9:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Why do you keep trying to concat this?
What happens if you simply cast the msg_date ?
What is the required format for XML date/date time values? Are they allowed to contain the T? Are they required to do so? _________________ chmod -R ugo-wx / |
|
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
|
|
|
|