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 -> Re: sysdate & date columns

Re: sysdate & date columns

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 23 Jan 2000 00:33:30 GMT
Message-ID: <86di8q$alt$5@news.seed.net.tw>

<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

Original text of this message

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