title: DateTime Comparison in Oracle
body: <p>I am doing comparison between several dates in my stored procedure.</p>
  
  <pre><code>    TODAY := TO_DATE(TO_CHAR(SYSDATE, 'DD-MON-YYYY') || 
               ' 09:00:00', 'DD-MON-YYYY HH24:MI:SS');
  
      IF PREVIOUS_DATE &lt; TODAY AND 
         TO_DATE(CURRENT_DATE, 'DD-MON-YYYY HH24:MI:SS') &gt;= TODAY THEN
          -- do something
      ELSE
          -- do something else
  </code></pre>
  
  <p>When I set <code>CURRENT_DATE = SYSDATE</code>, it did not get into the <code>IF</code> part. Can someone tell me where did i do wrong?</p>