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 » Datetime subtraction queston

Post new topic  Reply to topic
 Datetime subtraction queston « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Wed May 25, 2005 4:38 am    Post subject: Datetime subtraction queston Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Can someone give me the ESQL to find the time diff between two dates, one being in GMT format (PutTime).

Example:
PutTime: GMTTIME '12:29:31.980'
CurrentDateTime: 2005-05-25 07:29:33.021539


Thanks,
Mike
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 25, 2005 5:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You know you can get the current time as a GMTTIME?

There are a number of different DATE, TIME and DATETIME data types and functions, that will allow you to compute this.

http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.etools.mft.doc/ak05410_.htm
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.etools.mft.doc/ak01037_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
schroederms
PostPosted: Wed May 25, 2005 6:02 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I found this as well in Help. But what I'm trying to figure out is the CurrentDatetime from the MQMD PutTime value which is in GMT format. The EXTRACT ( that I can see ) will not help me here. Correct ?

Mike
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 25, 2005 6:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you want to know what the current date and time are, in GMT...
then you want one of the CURRENT_GMT* functions.

If you want to subtract one Date/DateTime/Time value from another, you use the subtraction operation, and get back an interval.
Quote:
Operator -
The result is the difference between the two operands. It is possible to:

* Subtract one numeric value from another.
* Subtract one datetime from another. The result is an interval.
* Subtract one interval from another.
* Subtract an interval from a datetime value.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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