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 » Time Calculation

Post new topic  Reply to topic
 Time Calculation « View previous topic :: View next topic » 
Author Message
bobbee
PostPosted: Wed Oct 05, 2011 3:57 pm    Post subject: Time Calculation Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 545
Location: Tampa

I have two type TIME fields:
CheckAtTime = 17:49:07.281
EndTime 17:49:17.280

I am issuing this ESQL and get noting in the result field

SET Env.Timer.TimeLeft = (Env.Timer.EndTime - CheckAtTime) SECOND;I would have expected 10.x as a result. I am getting a NULL.
Back to top
View user's profile Send private message Send e-mail AIM Address
kash3338
PostPosted: Wed Oct 05, 2011 6:48 pm    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Store the two values in a TIME variable and then subtract. Also check the use of INTERVAL function.
Back to top
View user's profile Send private message Send e-mail
bobbee
PostPosted: Wed Oct 05, 2011 7:33 pm    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 545
Location: Tampa

so I go back and try what you suggeted, Nothing changed. SO now I start changing the types that I am storing the result value in. When I hit CHAR this is what I got:

INTERVAL '9.999306' SECOND

So I go back and read and it does say string. So now I have to parse as I need the seconds in a usable form. What a SCRED up way of presenting a value that the go through alot of trouble to be specifically LEGAL about the output type when playing with mixtures of arithmetic on time values. I mean, come on. It's seconds, why would I want a string with descriptive characters in the result.

Well, on we move.
Back to top
View user's profile Send private message Send e-mail AIM Address
j.f.sorge
PostPosted: Wed Oct 05, 2011 8:36 pm    Post subject: Re: Time Calculation Reply with quote

Master

Joined: 27 Feb 2008
Posts: 218

bobbee wrote:
SET Env.Timer.TimeLeft = (Env.Timer.EndTime - CheckAtTime) SECOND;I would have expected 10.x as a result. I am getting a NULL.

Did you check the result within the debugger?! Then you probably have the same behaviour I had. The debugger always shows NULL but if you use your INTERVAL variable within your ESQL code everything works fine.
_________________
IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
bobbee
PostPosted: Thu Oct 06, 2011 4:23 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 545
Location: Tampa

really???? that is amazing. Will check, tnx!!!!!!!
Back to top
View user's profile Send private message Send e-mail AIM Address
Vitor
PostPosted: Thu Oct 06, 2011 4:45 am    Post subject: Re: Time Calculation Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

j.f.sorge wrote:
bobbee wrote:
SET Env.Timer.TimeLeft = (Env.Timer.EndTime - CheckAtTime) SECOND;I would have expected 10.x as a result. I am getting a NULL.

Did you check the result within the debugger?! Then you probably have the same behaviour I had. The debugger always shows NULL but if you use your INTERVAL variable within your ESQL code everything works fine.


The debugger claims another victim....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bobbee
PostPosted: Thu Oct 06, 2011 5:45 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 545
Location: Tampa

dumped the data in a TRACE node. It was not there in the debugger but it sure showwed up in the TRACE. Thanks!!!!!!!!!
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Time Calculation
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.