Possible Y2K Solution.

From: Travis D. Potter <hawk_at_waymark.net>
Date: 1998/05/09
Message-ID: <6j0q5v$h5b$1_at_supernews.com>#1/1


I'm working with Oracle 7 along with Forms 3.0 and SQR version 3, of which neither support the DD-MON-RR format mask as suggested by the Oracle White Papers. However, I've created a package procedure that I can call the has the following code:

create or replace package y2kdate as
procedure conversion (p_date in out date); end;
/

create or replace package body y2kdate as procedure conversion (p_date in out date) is   tempdate varchar2(20);
begin
  tempdate := to_char(p_date,'DD-MON-YY HH24:MI:SS);   p_date := to_date(tempdate,'DD-MON-RR HH24:MI:SS); end;
/

I include the hour/minute/second timestamp just incase the application is time sensitive.

I can then call the procedure from any application by just "y2kdate.conversion(<date_variable>)".

My latest thought is, why can't I just create a pre-insert and pre-update database trigger that calls this package procedure for each table/column with a date format column in the database schema I'm trying to make Y2K compliant?

Does anyone have any suggestions as to why this wouldn't work? Received on Sat May 09 1998 - 00:00:00 CEST

Original text of this message