title: extract date only from given timestamp in oracle sql
body: <p>The following query:</p>
  
  <pre><code>select cdate from rprt where cdate &lt;= TO_CHAR(sysdate, 'YYYY/MM/DD-HH24-MI-SS-SSSSS') and ryg='R' and cnum='C002';
  </code></pre>
  
  <p>return: <code>2013/04/27-10:06:26:794</code> as stored in the table.</p>
  
  <p>I want to get the date only as : <code>27-04-2013</code> and get the number of days between the resul tdate and sysdate.</p>