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

Home -> Community -> Usenet -> c.d.o.server -> Re: Date Arithmetic Question

Re: Date Arithmetic Question

From: Lothar Armbrüster <lothar.armbruester_at_rheingau.netsurf.de>
Date: 26 Oct 99 22:15:24 +0100
Message-ID: <657.968T1249T13353644@rheingau.netsurf.de>


Pete Clements wrote at 23-Okt-99 07:26:35 on the subject Date Arithmetic Question:

>Hi,

Hello Pete.

>sorry if this question seems a bit basic but :

>What sql can I use to tel how many hours(10,2 number) have elapsed
>between to DATE type fields

I cannot try this now (my Oracle is currently installing ;-) but it should work:

select (date1-date2)*24 from table;

The difference between two dates normally represents the days. Then, a day has 24 hours and there you are...

Hope that helps,
Lothar

--

Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Hauptstr. 26            | lothar.armbruester_at_t-online.de
D-65346 Eltville        |

Received on Tue Oct 26 1999 - 16:15:24 CDT

Original text of this message

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