title: Query using date datatype in Oracle 11g
body: <p>I'm trying to do simple select and Update in Oracle 11g using a date where clause and I can't produce the result I expect.</p>
  
  <p>The date field is <code>datemodified</code> and currently has values like 12-JUL-14 and of data type date.</p>
  
  <p>I'm doing the following and don't get result:</p>
  
  <pre><code>  select *
    from table
    where datemodified = to_date(datemodified, '12-JUL-14')
  </code></pre>
  
  <p>I tried the following and still did not produce result:</p>
  
  <pre><code>  select * from table
    where to_date(datemodified, 'DD-MON-YY') = to_date('12-JUL-15',   
    'DD-MON-YY')
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  Update table
    set column = 'some value'
    where datemodified = to_date('12-JUL-15', 'DD-MON-YY')
  </code></pre>
  
  <p>What am I doing wrong?</p>