Re: y2k
Posted in 1997
The answer is very simple: 1. You cant use triggers and stored procedures to update any column of the same table that fired the trigger. 2. You simply don't use 2 digit years - ever - for any reason. You catch this at an earlier time and make sure that anything that arrives at the database has 4 digits for the year. 3. If at all possible you use the mdy function to creat date values so you don't get problems relative to the date format (you might want to change DBDATE at some point in time or in a new installation). The mdy function obviously requires 4 digit years. yichen@hermes.cs.uh.edu (Yi Chen ) wrote: : :Is it possible to using triggers and stored procedures to modify date field :automatically when rows are inserted or updated. : :For examples :create table xxx ( xxx date); :when insert into xxx values("11/11/01"), what I need is "11/11/2001". :when insert into xxx values("11/11/40"), what I need is "11/11/1940". :i.e. :if year beween 00 and 10, put 20 before it. :Otherwise put 19 before it. : :We are on online 5. Even if to online 7.2 and set DBCENTURY=C, the problem is :still there because it is 50/50 split. : :Please email yichen@cs.uh.edu :Thanks : :Yi Chen : Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org