Re: Date Difference

From: DavidJRoth <davidjroth_at_aol.com>
Date: 12 Jan 1995 21:20:03 -0500
Message-ID: <3f4o0j$sc2_at_newsbf02.news.aol.com>


>Subject: Date Difference
>From: agandhi_at_mason1.gmu.edu (Ajay M Gandhi)
>Date: 12 Jan 1995 20:11:06 GMT
>Message-ID: <3f42cq$3un_at_portal.gmu.edu>
 

>Hi,
 

>Is there any function that can find the number of hours and
>minutes between two date functions?
 

>For example, I am interested in getting 02:30 with the follwoing
>data.
 

>Start date = 12-Jan-1995
>End Date = 12-Jan-1995.
 

>Both the above dates were updated into the database at an
>interval of 2 hrs and 30 mins.
 

>I would appreciate any help.
 

>THanks,
 

>Ajay Gandhi

Oracle stores dates as decimal numbers. The whole part is the date and the fraction is the fraction of a day.

select 24*(end_date-start_date) from xxx;

will yield the duration in hours.

David Roth
CMC Systems
508-392-1300 Received on Fri Jan 13 1995 - 03:20:03 CET

Original text of this message