Xref: alice comp.databases.oracle.misc:17234
Path: alice!news-feed.fnsi.net!ais.net!jamie!vixen.cso.uiuc.edu!sdd.hp.com!news.cup.hp.com!not-for-mail
From: Michael Rothwell <michael_rothwell@non-hp-usa-om46.om.hp.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Y2K Problem and Oracle 7.3
Date: Tue, 07 Jul 1998 09:07:44 -0700
Organization: Hewlett-Packard USA
Lines: 38
Message-ID: <35A247D0.668B3CC@non-hp-usa-om46.om.hp.com>
References: <6nt24e$b95$1@nclient5-gui.server.virgin.net>
Reply-To: michael_rothwell@non-hp-usa-om46.om.hp.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.03 [en] (WinNT; U)

Dominique Potter wrote:
> 
> Hi,
> Can anyone help with this little problem.
> 
> Environment:
> Oracle 7.3, Win95, SQLWindows application.
> 
> Constraints: Win95 config cannot change, SQLWindows application cannot
> change.
> 
> Problem:
> If a user enters a date for the next century, e.g 2001, the SQLWindows
> application passes back to Oracle the date '1901' (it's a BUG).  I need to
> provide a solution that will update ANY dates inserted/updated into Oracle.
> I am not worried about dates prior to 1949, hence I tried to set the
> NLS_DATE_FORMAT to 'DD-MM-RRR' to force Oracle into correcting the century.
> This will work if a user enters a two digit century, but not with four digit
> centuries.
> 
> One thought would be to create a 'before insert trigger' on every date field
> in every table.  This trigger would read the date columns and correct it if
> the century is incorrect.  Problem is I have approx two hundred tables with
> *lots* of date fields.
> 
> Does anyone have any thoughts on this ?  Any help would be really
> appreciated.
> Thanks
> 
> Dominique
> 
> Dom@cheerful.com

Use 'DD-MM-RRRR'.  You only had 3 R's rather than 4.  I use
this mask with 7.3.3 in several applications with no problem
using century or not.

MR.
