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 » maaping datetime datatype

Post new topic  Reply to topic
 maaping datetime datatype « View previous topic :: View next topic » 
Author Message
WMBSAM
PostPosted: Mon Apr 19, 2010 1:07 pm    Post subject: maaping datetime datatype Reply with quote

Voyager

Joined: 02 Oct 2009
Posts: 90
Location: Atlanta

i am trying to map xsd:date and xsd: time datatype element to xsd:datetime
(pattern:yyyy-MM-ddTHH:mm:ss.SSSZZZ)

As i cannot directly map both the input elements to Datetime datatype i have converted them to string format and then datetime format. here is what i am doing:


Code:

DECLARE FormattedDateTimeValue CHARACTER;
      SET FormattedDateTimeValue = CAST(Input.RequestData.StartTransDate AS CHARACTER FORMAT 'yyyy-MM-dd')||'T'|| CAST(Input.RequestData.StartTransTime AS CHARACTER FORMAT 'HH:mm:ss.SSSZZZ');
      
SET Output.start_date_time = CAST(FormattedDateTimeValue AS TIMESTAMP FORMAT 'TU');


where datatype of start_date_time is XSD:datetime

result: i get the value of FormattedDateTimeValue = 2009-04-20T00:00:00
but the the value of Output.start_date_time = 2009-04-20 00:00:00.0000

so in Output.start_date_time the letter T is missing is there any way that i can retain t in the output to match the datetime format required in the output xsd??

Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Apr 19, 2010 2:36 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Which XML parser are you using? XMLNSC ( from v6.1 ) always outputs the 'T' in order to comply with the XML Schema lexical format.
Back to top
View user's profile Send private message
WMBSAM
PostPosted: Mon Apr 19, 2010 2:41 pm    Post subject: Reply with quote

Voyager

Joined: 02 Oct 2009
Posts: 90
Location: Atlanta

i am using XMLNSC parser but i don't see the T in the output i cannot see it in the trace
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Apr 19, 2010 2:47 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The Trace node is not ( necessarily ) showing you what the XMLNSC parser will output. It's showing you the contents of the logical message tree. The values written by the Trace node are in their ESQL lexical form. XML and XMLNS actually use the ESQL lexical form, but XMLNSC purposely complies with the XML Schema standard and puts in the 'T'.
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 » maaping datetime datatype
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.