title: How can I get the number of days between 2 dates in Oracle 11g?
body: <p>I'm trying to find an integer number of days between two dates in Oracle 11g.  </p>
  
  <p>I can get close by doing </p>
  
  <pre><code>select sysdate - to_date('2009-10-01', 'yyyy-mm-dd') from dual
  </code></pre>
  
  <p>but this returns an interval, and I haven't been successful casting this to an integer.</p>
  
  <p>Edit: Apparently in 10g, this returns the number of days as an integer.</p>