title: How can I get the difference in hours between two dates?
body: <p>I have to do a "select" that returns the difference between a field of type date from the database and the current date in hours. How can I do this in oracle?</p>
  
  <p>I try this:</p>
  
  <pre><code>   select 24 * (to_date(sysdate, 'YYYY-MM-DD hh24:mi') 
           - to_date('2012-02-28 15:20', 'YYYY-MM-DD hh24:mi')) diff_hours 
     from dual;
  </code></pre>
  
  <p>But that did not work.</p>