title: TO_DATE returning different dates for different format masks?
body: <p>I am having query on the below sql.
  Please help me. <BR></p>
  
  <pre><code> select to_date(sysdate, 'DD MONTH YYYY') , to_date(sysdate, 'yyyy/mm/dd hh24:mi:ss')
   from dual where 
   to_date(sysdate, 'DD MONTH YYYY') &lt; to_date(sysdate, 'yyyy/mm/dd');
  </code></pre>
  
  <p>1) to_date(sysdate, 'DD MONTH YYYY') this will give Date object without time (may be time is 00:00). <BR>Am i correct ? If not how will i get only Date object without Time in it? <BR>
  2) From the above query It seems  to_date(sysdate, 'yyyy/mm/dd') is greater than to_date(sysdate, 'DD MONTH YYYY'). Why ??</p>
  
  <p><BR> <BR>
  <B>Update </B></p>
  
  <hr>
  
  <p>1) My aim in the above URL is to find out to_date function will only return date (or along with time) though format 'DD MONTH YYYY' is not mentioning the time chars(hh:mm..) in it. <BR>
  2) From the response i got that to_date will return Date with time always though we didn't mention the time chars. <BR>
  3) Finally to get only DATE we should use trunc() / to_date(to_char(sysdate,'mm-dd-yyyy'),'mm-dd-yyyy') <BR></p>
  
  <p>Check the below</p>
  
  <pre><code>select to_char(trunc(sysdate), 'yyyy/mm/dd hh24:mi:ss'), 
  to_char(to_date(to_char(sysdate, 'yyyy-MM-dd'),'yyyy/mm/dd hh24:mi:ss'),'yyyy/mm/dd hh24:mi:ss') 
  from dual;
  </code></pre>
  
  <p>-->hh24  :24 is important to get 00:00 format.</p>