Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> dates in where clause using to_date and =
I would like to use the to_date function in a where clause. If I do
select eventdate from countycal;
stuff
stuff
07/06/2000 07/06/2000 07/06/2000
however if I do:
select eventdate
from countycal
where eventdate = to_date('07/06/2000','MM/DD/YYYY')
no rows selected
However if I do:
select eventdate
from countycal
where eventdate like to_date('07/06/2000','MM/DD/YYYY')
07/06/2000 07/06/2000 07/06/2000
or if I do
select eventdate
from countycal
where eventdate BETWEEN to_date('07-05-2000','MM-DD-YYYY')
and to_date('07-07-2000','MM-DD-YYYY')
07/06/2000 07/06/2000 07/06/2000 07/07/2000
which make sense.
I evidentally do not understand the use of the equals sign with repect
to date
formating. Could someone explain where I am missing it.
Thanks
Pete
Received on Mon Aug 07 2000 - 00:00:00 CDT