Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sysdate & date columns
<ethanpost_at_my-deja.com> wrote in message news:86605s$8rc$1_at_nnrp1.deja.com...
> Gee Larry why didn't you come to me in the first place!
>
> select * from table1 where date1 = to_date(sysdate, 'DD-MON-YYYY)
>
> The value sysdate contains the time also, your date column is most
> likely exactly midnight, you need to do a to_date to get the time to
> midnight on sysdate.
Never put a DATE in the TO_DATE() function. You'll get a wrong result.
TO_DATE() function ONLY accept a string in the 1st parameter. And more, if your NLS_DATE_FORMAT is not 'DD-MON-YYYY' or something similar, you'll get a error message. Received on Sat Jan 22 2000 - 18:33:30 CST
![]() |
![]() |