Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date Arithmetic Question
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