Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> dates in where clause using to_date and =

dates in where clause using to_date and =

From: Peter Shankey <shankeyp_at_charlestoncounty.org>
Date: 2000/08/07
Message-ID: <398F6E93.BB7400DC@charlestoncounty.org>#1/1

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

stuff
stuff
ie nls format is 'MM/DD/YYYY'

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US