Home » SQL & PL/SQL » SQL & PL/SQL » calculate the time difference
calculate the time difference [message #185765] Thu, 03 August 2006 08:16 Go to next message
gauravpuri
Messages: 26
Registered: August 2005
Location: Chennai
Junior Member

hi
How to calculate the time difference between
to_date('11:30:00','hh24:mi:ss') and
to_date('08:00:00','hh24:mi:ss')

Re: calculate the time difference [message #185767 is a reply to message #185765] Thu, 03 August 2006 08:23 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
to_date('11:30:00','hh24:mi:ss') - to_date('08:00:00','hh24:mi:ss')

will give you the difference in fractions of a day.
Both of the to_dates will return the first day of the current month as the Date, and the specified time as the Time part of the date.
Previous Topic: ORA 06502
Next Topic: how to retrive the user domain ?
Goto Forum:
  


Current Time: Sat Dec 10 12:56:51 CST 2016

Total time taken to generate the page: 0.08250 seconds