Author |
Message
|
neo_revolution |
Posted: Thu Mar 11, 2004 2:52 pm Post subject: XML Timestamp |
|
|
Voyager
Joined: 21 Oct 2003 Posts: 80 Location: NJ
|
Hello,
I am creating current timestamp using ESQL. But my XML schema is expection a different format for Timestamp.
My xml schema is expecting "yyyy-MM-ddTHH:mm:ss.SS"
Is there a way to create such a format? Or else I need to use substrin function and create it...
Thanks in advance. |
|
Back to top |
|
 |
Missam |
Posted: Thu Mar 11, 2004 3:18 pm Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Yes you need to convert it manually using SUBSTRING function. |
|
Back to top |
|
 |
kirani |
Posted: Thu Mar 11, 2004 6:33 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Do you have your XML schema imported into MRM and using that for transformation? IF you do then I believe WMQI will take care of reforamtting.
Do you get an error when trying to assign CURRENT_TIMESTAMP to XML MRM element? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
neo_revolution |
Posted: Fri Mar 12, 2004 6:48 am Post subject: |
|
|
Voyager
Joined: 21 Oct 2003 Posts: 80 Location: NJ
|
No I don't have XML schema imported to MRM... Is there any PDF I can go through for importing XML schema...
Thanks Kiran. |
|
Back to top |
|
 |
Missam |
Posted: Fri Mar 12, 2004 8:45 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Quote: |
Do you get an error when trying to assign CURRENT_TIMESTAMP to XML MRM element |
Hai Kirani CURRENT_TIMESTAMP gives the format of timestamp in ccyy-mm-dd hh:mm:ss.SSSSS
But neo Wants the Format
Quote: |
My xml schema is expecting "yyyy-MM-ddTHH:mm:ss.SS"
|
did u see the T in between date and time.Is there any way to achive this directly with out manually formatting |
|
Back to top |
|
 |
kirani |
Posted: Fri Mar 12, 2004 1:22 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Yes. You can define the output <TIMESTAMP> element into MRM and then use code similar to following for transformation,
Code: |
SET OutputRoot.MRM.Today = CURRENT_TIMESTAMP;
|
This will produce output XML message similar to,
Code: |
<Today>2004-03-12T13:17:15+00:00</Today>
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|