Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How do I get the minutes between two dates ?
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 - 11:32:39 CST