× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.








Thanks all!!!!  It looks like this will work for me.....Much
appreciated!!!!



                                                                           
             "DeLong, Eric"                                                
             <EDeLong@Sallybea                                             
             uty.com>                                                   To 
             Sent by:                  "Midrange Systems Technical         
             midrange-l-bounce         Discussion"                         
             s@xxxxxxxxxxxx            <midrange-l@xxxxxxxxxxxx>           
                                                                        cc 
                                                                           
             06/27/2006 11:36                                      Subject 
             AM                        RE: SQL - Calculate the number of   
                                       hours between 2 timestamps          
                                                                           
             Please respond to                                             
             Midrange Systems                                              
                 Technical                                                 
                Discussion                                                 
             <midrange-l@midra                                             
                 nge.com>                                                  
                                                                           
                                                                           




Hi Todd,

Does this get your selections?

SELECT * from abc where (now() - RVCRDT) >= 80000.00



Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-297-2863 or ext. 1863



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of
todd.sabella@xxxxxxxxxxxxx
Sent: Tuesday, June 27, 2006 8:04 AM
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: SQL - Calculate the number of hours between 2 timestamps

Folks,

With SQL,I am trying to determine if the time stamp value in a field
(RVCRDT) within a file (RTPRVER) is more than 8 hours old.

SELECT hour(NOW() - timestamp(RVCRDT)) , timestamp(RVCRDT) as create_date,
NOW()
FROM RTPRVER
WHERE hour(NOW() -  timestamp(RVCRDT)) >= 8

I thought that the HOUR function would give me what I needed, but it seems
to be just subtracting the hours portions of the timestamp fields.

Here's some results that I'm getting.  Obviously, I'm missing something

HOUR   CREATE_DATE            NOW ( )
   8  2006-01-02-00.46.36.000000    2006-06-27-08.47.19.481856
   8  2006-02-12-00.31.37.000000    2006-06-27-08.47.19.481856
   8  2006-02-13-00.17.26.000000    2006-06-27-08.47.19.481856
   8  2006-02-13-00.17.37.000000    2006-06-27-08.47.19.481856
   8  2006-02-13-00.24.35.000000    2006-06-27-08.47.19.481856
   8  2006-02-13-00.36.11.000000    2006-06-27-08.47.19.481856

Any help would be appreciated!!!!!
Thanks
Todd





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.