Home » SQL & PL/SQL » SQL & PL/SQL » finding time elapsed between two dates (Oracle 10g)
finding time elapsed between two dates [message #352512] Wed, 08 October 2008 02:16 Go to next message
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hello everyone,

I am trying to subtract two dates in the format 'DD/MM/YYYY HH24:MI' to find the time elapsed between the two. In fact these dates are login and logout times for which the date part ('DD/MM/YYYY') are obviously the same for both, e.g '08/10/2008 11:10 A.M' for login and '08/10/2008 11:30 A.M' for logout.
What I intend to do is calculate the time in hours and minutes elapsed between login and logout. I'm merely subtracting logout from login time but it's the output of this operation that I'm not being able to present in Hours and Minutes.

could someone help on this please.

Re: finding time elapsed between two dates [message #352514 is a reply to message #352512] Wed, 08 October 2008 02:33 Go to previous messageGo to next message
Michel Cadot
Messages: 63956
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please search BEFORE posting:
http://www.orafaq.com/forum/?SQ=b1dbfe259eb23da80860c322de720f37&t=search&srch=difference+between+time+in+hours+minutes+secon ds&btn_submit=Search&field=all&forum_limiter=&search_logic=AND&sort_order=DESC&author=

Re: finding time elapsed between two dates [message #352520 is a reply to message #352512] Wed, 08 October 2008 02:51 Go to previous message
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Or use Extract keyword

Thumbs Up
Previous Topic: ORACLE Project on LOBs
Next Topic: update a field on a table depending on file created on sun server
Goto Forum:

Current Time: Fri Oct 28 15:32:37 CDT 2016

Total time taken to generate the page: 0.28718 seconds