ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Message Broker - Mapping

Post new topic  Reply to topic
 Message Broker - Mapping « View previous topic :: View next topic » 
Author Message
HIMAGAR
PostPosted: Mon Nov 09, 2015 8:02 am    Post subject: Message Broker - Mapping Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 09, 2015 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message
HIMAGAR
PostPosted: Mon Nov 09, 2015 8:21 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 09, 2015 9:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Message Broker - Mapping
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.