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: How do I get the minutes between two dates ?

Re: How do I get the minutes between two dates ?

From: Mohamed Buhari <mbuhari_at_assigncorp.com>
Date: 25 Jan 2000 13:21:54 EST
Message-ID: <388DE924.27333AF2@assigncorp.com>


This is very simple :

Assuming those two cloumn names are end_date and start_date of your call table :

select (end_date - start_date )*24*60 "minutes" from call;

Thats it!.

Mohamed Buhari
Oracle dba.

Paul Jeynes wrote:

> I've got a slight problem with some date manipulation which I initially
> thought would be straightforward. I'm loading data into a table through SQL
> Loader. The data contains two date fields which record the start and end
> time of a telephone call (in format 'DD/MM/YYYY HH24:MI:SS')
>
> I've got a BEFORE INSERT trigger on the table within which I want to
> calculate into another field, the duration of the call. Therefore I
> subtract the end date from the start date.
>
> This gives me the duration of the call as a numeric fraction of a day. I'd
> like to store the duration field as hours, minutes and seconds (not fussy if
> it's held in a varchar either).
>
> I've done the normal multiply by 24 and 60 to get it into minutes but this
> still gives the seconds as a decimal rather than as true seconds. I've also
> tried various date masks without success so now I'm really confused.
>
> Am I missing something ?
>
> Any help would be appreciated.
Received on Tue Jan 25 2000 - 12:21:54 CST

Original text of this message

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