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

Re: sysdate in 2000. Irritating problem..

From: Jaap W. van Dijk <j.w.vandijk_at_hetnet.nl>
Date: Fri, 4 Feb 2000 10:43:03 +0100
Message-ID: <O3dEsQvb$GA.330@net025s>


What has NLS_DATE_FORMAT got to do with it? When you're executing

    select sysdate-entrydate from members

there's no formatting involved. Or isn't the datatype of your entrydate column DATE? And if it is, why do you use a to_date function on this column? And if it isn't, what is it then, and how is the date stored in this column?

What does your 'nonsense' look like? and what if it's 'OK'?

Jaap.

Martin Vonk heeft geschreven in bericht <87d2li$2lip2$1_at_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 Fri Feb 04 2000 - 03:43:03 CST

Original text of this message

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