Oracle to_char in query is not working
<p>Im trying to run this below query but its seems to be error </p>

<p>For those data types are <code>varchar</code> </p>

<p><strong>Query</strong></p>

<pre><code>select * 
  from RP_REPORT_TEMP 
 where to_char(START_DATE,'FM DD YYYY HH24:MI:SS AM') 
          &gt;= 'May 01 2016 00:00:00' 
   and to_char(END_DATE,'FM DD YYYY HH24:MI:SS PM') 
          &lt;= 'May 31 2016 11:59:00' 
   and lower(rid) like '%a001%' 
 order by CAST(cid as INTEGER) asc
</code></pre>

<p><strong>Table</strong></p>

<pre><code>|RID                 |START_DATE                 |END_DATE                     |
|--------------------|-------------------------- |-----------------------------|
|A001                |May  1 2016 12:00:00:000AM |May  31 2016 12:00:00:000PM  |
|A001                |May  1 2016 12:00:00:000AM |May  31 2016 12:00:00:000PM  |
|A001                |May  1 2016 12:00:00:000AM |May  31 2016 12:00:00:000PM  |
</code></pre>

<p>While i tried to execute this query. Query return some error. How can i fix this ?</p>

<p><strong><em>Error</em></strong></p>

<pre><code>SQL Error [1722] [42000]: ORA-01722: invalid number
java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
</code></pre>