Posted: Tue Oct 01, 2002 8:43 am Post subject: Accessing InputRoot.Properties.CreationTime.
Acolyte
Joined: 29 May 2002 Posts: 63 Location: UK
We've encountered a strange error when using InputRoot.Properties.CreationTime.
Normally, it returns 'GMTTIMESTAMP '2002-10-01 15:11:51.480'' and we substring from byte 15 for 23 bytes to get the date and time.
However, we seem to occasionally receive a shorter timestamp (such as 'GMTTIMESTAMP '2002-09-30 16:32:26''). Naturally, when we substring this, our XML message finds a spurious apostrophe at the end. We cannot work out when exactly this happens - perhaps when MQ puts a message to the queue precisely on the second?
Has anyone else come across this?
At the moment, we are asking our users whether they really really require the time to thousandths of a second ('cos it's a quicker fix!)...
Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany
InputRoot.Properties.CreationTime ist data type GMTTIMESTAMP. So it might be easier to CAST or EXTRACT those values you need, instead of doing string manipulation. For example:
SET Environment.Var.MyTime=CAST(InputRoot.Properties.CreationTime AS GMTTIME);
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