title: find the elapsed time between two dates in oracle sql
body: <p>i need to find the difference between the time  in the format hh:mm:ss </p>
  
  <pre><code>select msglog.id,max(msglog.timestamp) enddate,
     min(msglog.timestamp) startdate,
     enddate - startdate
     from MESSAGELOG msglog
     group by id
  </code></pre>
  
  <p>In the abovequery msglog.timestamp is of type DATE. </p>
  
  <p>How can I get the elapsed time or diff between the time in the correct format in oracle?</p>