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 -> sysdate in 2000. Irritating problem..

sysdate in 2000. Irritating problem..

From: Martin Vonk <mwvonk_at_wxs.nl>
Date: Fri, 4 Feb 2000 00:23:19 +0100
Message-ID: <87d2li$2lip2$1@reader3.wxs.nl>


Hi folks,

I've a irritating problem.
I've just encountered this problem today since I've not been involved for six weeks with Oracle SQL.
In the old days (<=1999) a simple query like: select sysdate-entrydate from members; wen't OK. It displayed the number of days between to date and the entrydate of a member.

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.

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.

Live has to become easier (so less typing), not more complicated.

Please, can someone explain what I'm doing wrong ???????

Thanks in advance

Martin Vonk Received on Thu Feb 03 2000 - 17:23:19 CST

Original text of this message

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