|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to Trim the extracted 'CURRENT_TIMESTAMP'? |
« View previous topic :: View next topic » |
Author |
Message
|
venkat523 |
Posted: Thu May 09, 2002 10:47 am Post subject: |
|
|
Newbie
Joined: 08 May 2002 Posts: 2
|
Hi,
I'm using the following code in a trace node to log the time stamp.
Retrieved request message ${Root.MQMD.MsgId} at ${EXTRACT (HOUR FROM CURRENT_TIMESTAMP)}:${EXTRACT (MINUTE FROM CURRENT_TIMESTAMP)}:${EXTRACT (SECOND FROM CURRENT_TIMESTAMP)}
It returns the output in the following form.
Retrieved request message X'414d512042534f33424b5130202020203cb5a8130e735012' at
9:57:5.294785308837891E+1
But according to my requirement, I don't want this scientific form of 'Seconds' timing. How can I do that. I tried to use 'Trim' while extracting. But it gave sytax error. Could anybody help me out in this.
Thanks and Regards,
Venkat |
|
Back to top |
|
 |
kirani |
Posted: Thu May 09, 2002 12:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
${SUBSTRING(CAST(CURRENT_TIME AS CHAR) FROM 7 FOR }
will give you time in HH:MM:SS format.
_________________ 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 |
|
 |
venkat523 |
Posted: Thu May 09, 2002 2:01 pm Post subject: |
|
|
Newbie
Joined: 08 May 2002 Posts: 2
|
Hi Kiran ~
First let me thank you for your solution.
The code that was provided by you worked fine.
Retrieved request message ${Root.MQMD.MsgId} at ${SUBSTRING(CAST(CURRENT_TIME AS CHAR)FROM 7)}
is giving the following output:
Retrieved request message X'414d512042534f33424b5130202020203cb5a8130e737012' at
17:52:34.667865'
This is what my requirement is.
Thanks a lot once again.
Regards,
Venkat
|
|
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
|
|
|
|