Re: Y2k and d2k

From: Dominique Potter <dom_at_cheerful.com>
Date: Mon, 6 Jul 1998 13:13:40 +0100
Message-ID: <6nt2le$bbf$1_at_nclient5-gui.server.virgin.net>


Hi,
[Quoted] 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_at_cheerful.com


DanHW wrote in message <1998070200544500.UAA16481_at_ladder03.news.aol.com>...
>>I need to make some forms y2k compiant and I wondered if I am covering all
>>the bases
>>by making date fields in reports 4 character, and in reports, changing all
>>yys to RRs in
>>item properties. Does anyone have experience here. What about triggers?
>>
>>thanks,
>>
>>sean
>
>Oracles position is that if you store date data in the DATE datatype, the
dates
>are ok. What you do with them in triggers, etc may of course violate that
>somehow. I do not use the RR format, I just use the YYYY format everywhere
so
>there is no question.
>
>Dan Hekimian-Williams
Received on Mon Jul 06 1998 - 14:13:40 CEST

Original text of this message