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

Home -> Community -> Usenet -> c.d.o.misc -> Re: getting time difference in hours between two date columns

Re: getting time difference in hours between two date columns

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 30 Apr 2003 22:25:00 +0200
Message-ID: <vb0ci8eohuf698@corp.supernews.com>

"Matthias Wirtz" <Matthias.Wirtz_at_epost.de> wrote in message news:b8p87m$c1ps6$1_at_ID-151394.news.dfncis.de...
> Hi,
>
> I want to get the time difference in minutes of two date columns. I tried
it
> with:
>
> SELECT ROUND((from_date - until_date)*24*60) FROM date_table;
>
> It seems to work. Is there a special function like BETWEEN_DAYS for this
> purpose too?
> --
> Matthias Wirtz - Norfolk, USA
>
>

No there isn't. The function you mention has been developed to deal with leap years. A day always consists of 24 hours and 60 minutes in an hour, so there is no need for the function.

-- 
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Wed Apr 30 2003 - 15:25:00 CDT

Original text of this message

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