Re: sysdate in 2000. Irritating problem..

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Fri, 4 Feb 2000 09:02:20 +0000
Message-ID: <KZpmyLAcWpm4Ew5m_at_ahardy.demon.co.uk>


In article <87d2li$2lip2$1_at_reader3.wxs.nl>, Martin Vonk <mwvonk_at_wxs.nl> writes
>Hi folks,
>
>I've a irritating problem.
[snip]
>
>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.

In general, *don't* use to_date against a date field - it will first have to convert the date to a string using the NLS_DATE_FORMAT before it can create a date using the format given and if the two don't match you get garbage.

However, your formats match for the sysdate so that appears OK.

What data type is entrydate? Is it a date? Is it the correct date - i.e. does it have a sensible DD-MON-YYYY result?

Taking one date from another should always work! Problems since Y2K would tend to point to entrydate having some problems.

Andy

-- 
Andy Hardy. PGP key available on request
===============================================================
Received on Fri Feb 04 2000 - 10:02:20 CET

Original text of this message