Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Help with date calculation

Help with date calculation

From: LOREN SUMMERS <loren_summers_at_yahoo.com>
Date: Wed, 15 Nov 2000 18:25:44 -0800 (PST)
Message-Id: <10681.122213@fatcity.com>


I am trying to get this sql statement working. All the dates are stored in number field in seconds starting from 1-JAN-1970.
-- All records where adate - bdate is greater than 20
minutes.

Select * from timetable
where (adate - bdatae) > 20 minutes;
-- All records where sydate - bdate > 20 minutes
select * from timetable
where (sydate - bdate) > 20 minutes;

I tried the following and I am not sure whether I am right.

Select * from timetable
where ((adate-bdate) > 20 * 60); --( which will give 20 minutes)

select * from timetable
where
(sysdate-20/1440)-to_date('01-JAN-1970','DD-MON-YYYY')+bdate(24*60*60)>20);

TIA Loren



Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays! Received on Wed Nov 15 2000 - 20:25:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US