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 » Changing date format in ESQL

Post new topic  Reply to topic
 Changing date format in ESQL « View previous topic :: View next topic » 
Author Message
bullaydin
PostPosted: Wed Jul 12, 2006 4:36 am    Post subject: Changing date format in ESQL Reply with quote

Apprentice

Joined: 16 Feb 2006
Posts: 25
Location: Germany

Hi ,

I have a message flow (Websphere MB v6) which receive XML -Message from Host, then create a SOAP Message . Here is the output message :


Code:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ucc="http://webapps.uta.de/ucc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:NS1="http://www.w3.org/2001/12/soap-envelope" NS1:encodingStyle="http://www.w3.org/2001/12/soap-encoding" xsi:type="soapenv:Envelope">
 <soapenv:Body xsi:type="soapenv:Body">
  <ucc:OSIS010P>
   <action xsi:type="xsd:string">Update</action>
   <data>
    <SCSKEN xsi:type="xsd:decimal">161</SCSKEN>
    <SCSKSA xsi:type="xsd:string">BETRAG  </SCSKSA>
    <SCSKTA xsi:type="xsd:string">Betrag in Euro                                              </SCSKTA>
    <SCSKFA xsi:type="xsd:string">LIMTYK</SCSKFA>
    <SCSKAK xsi:type="xsd:string">1</SCSKAK>
    <LOEKZK xsi:type="xsd:string">1</LOEKZK>
    <USRIDA xsi:type="xsd:string">EDV_STJU  </USRIDA>
    <SESIDA xsi:type="xsd:string">060516095311EDV_STJU</SESIDA>
    <PROGRA xsi:type="xsd:string">Schluessel</PROGRA>
    <OBJIDN xsi:type="xsd:decimal">1631665392</OBJIDN>
    <UPDATT xsi:type="xsd:dateTime">2006-07-05-14.58.40.525000</UPDATT>
    <QTEIGK xsi:type="xsd:string">3</QTEIGK>
   </data>
  </ucc:OSIS010P>
 </soapenv:Body>
</soapenv:Envelope>



Element-UPDATT' value ( "xsd:dateTime" type) has incorrect format , according to XML Schema Specifications.

I am trying to solve this with manupilation of output message in Compute node with following code , but it was not succesful.

Code:
   DECLARE pattern CHARACTER 'yyyy-MM-dd HH:mm:ss.SSSSSS';

SET OutputRoot.MRM.soapenv:Body.ucc:OSIS010P.data.UPDATT  = CAST(InputBody.UPDATT AS DATE FORMAT pattern);



Is there anybody, who has other idea ?

best regards
_________________
*************************

" Sharing knowledge better than having it ."

http://www.openpoint.de
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Wed Jul 12, 2006 4:41 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
but it was not succesful
What went wrong. Did you get an error message?
Back to top
View user's profile Send private message
bullaydin
PostPosted: Wed Jul 12, 2006 4:52 am    Post subject: Reply with quote

Apprentice

Joined: 16 Feb 2006
Posts: 25
Location: Germany

there is no error, only the output is incorrect value ;

Code:
<UPDATT xsi:type="xsd:dateTime">2006-07-05-00.00.00.000000</UPDATT>

_________________
*************************

" Sharing knowledge better than having it ."

http://www.openpoint.de
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Wed Jul 12, 2006 6:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Here's your problem:
Quote:
AS DATE

Try 'AS TIMESTAMP' or 'AS GMTTIMESTAMP'
Back to top
View user's profile Send private message
bullaydin
PostPosted: Wed Jul 12, 2006 6:26 am    Post subject: Reply with quote

Apprentice

Joined: 16 Feb 2006
Posts: 25
Location: Germany

zeros was replaced with original value, but output form wasn't changed....


Code:
    <UPDATT xsi:type="xsd:dateTime">2006-07-05-14.58.40.525000</UPDATT>

_________________
*************************

" Sharing knowledge better than having it ."

http://www.openpoint.de
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Thu Jul 13, 2006 12:25 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So what's wrong with the output? Were you expecting a space between the date and the time, instead of a '-'? Are you sure that you haven't just copied the value from input to output?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 13, 2006 2:30 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

bullaydin wrote:
zeros was replaced with original value, but output form wasn't changed....


Code:
    <UPDATT xsi:type="xsd:dateTime">2006-07-05-14.58.40.525000</UPDATT>

You sure this is the right syntax and you should not be having:
<UPDATT xsi:type="xsd:dateTime">2006-07-05T14:58:40.525000-04:00</UPDATT>

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bullaydin
PostPosted: Thu Jul 13, 2006 10:40 pm    Post subject: Reply with quote

Apprentice

Joined: 16 Feb 2006
Posts: 25
Location: Germany

Quote:

You sure this is the right syntax and you should not be having:
<UPDATT xsi:type="xsd:dateTime">2006-07-05T14:58:40.525000-04:00</UPDATT>

Enjoy


I am expecting this format.

_________________
*************************

" Sharing knowledge better than having it ."

http://www.openpoint.de
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Fri Jul 14, 2006 2:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Your format string has several errors. Try 'yyyy-MM-dd-HH.mm.ss.SSSSSS'.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 14, 2006 4:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And just be aware that it is not an xsd:datetime format as those are regulated by the xml and w3 boards....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Changing date format in ESQL
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.