Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sysdate in 2000. Irritating problem..
Martin Vonk wrote:
>
> Now in 2000 it is giving idiot results. To be more specific:
> It concerns PO815.
> I've set the NLS_DATE_FORMAT='DD-MON-RR' in init.ora and in the registry key
> HKLM\software\oracle\HOME0 as well.
> If I execute the same query in 2000:
> select sysdate-entrydate from members; I got a lot of nonsence. Sysdate
> turns out to be 0 .
> I've tried DD-MON-RRRR as well. No luck either.
>
I guess it would help if you gave an example of the nonsensical results.
> However, if I execute the query:
> select to_date(sysdate,'dd-mon-rr')-to_date(entrydate,'dd-mon-rr') from
> members; than everything works fine.
>
So entrydate is not of type DATE ???
If it is, it probably means your data in entrydate is screwed up.
check by selecting to_char(entrydate,'dd-mm-yyyy') along with the other
columns which produced the nonsense.
Christian Received on Thu Feb 03 2000 - 18:50:57 CST
![]() |
![]() |