Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

minutes between times.

Status
Not open for further replies.

Apprentice101

IS-IT--Management
Aug 16, 2004
66
US
Can someone please help me with this procedure? It works sometimes and sometimes it does not. i think it may have something to do with decimals in the arythmetic operation.

any suggestions?

thanks!



PROCEDURE minute_interval IS
BEGIN
declare

total_minutes number;

begin

total_minutes:= :)surgery.time_out - :surgery.time_in)*1440;

:surgery.total_surg_time := total_minutes;


END;
END;
 
found solution!, thanks

:surgery.total_surg_time := trunc(total_minutes);
 
Yes, Apprentice, dates include granularity down to seconds. If you subtract one date from another, the results include partial minutes (seconds), which appear as a value behind the decimal.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top