title: How to use datediff equivalent in Oracle with YYYYMMDD formatted number?
body: <p>I have Oracle database columns with the <code>number</code> format <code>YYYYMMDD</code>. I have not been successful in using this format with <code>datediff</code> to get the difference between two dates. The <a href="http://www.w3schools.com/sql/func_datediff.asp" rel="nofollow">documentation</a> I've read online uses a different format:</p>
  
  <pre><code>DATEDIFF(day,'2008-06-05','2008-08-05')
  </code></pre>
  
  <p>What's the best way for me to get number of days between two dates given the format available to me in Oracle? Answers not involving <code>datediff</code> are acceptable as long as it gets the number of days between two dates with the format <code>YYYYMMDD</code>.</p>