Re: Year 2000 and 2 digit years fields
Posted in 1996
Pat, On 8 Mar 1996, Pat O'Grady wrote: > Currently when a 2 digit year is entered on a form for a date field, > the century defaults to 1900. I assume in the year 2000, this will > change and the century will now be 2000. Am I correct? No: 00 = 1900 currently if your DBDATE environment variable is set to 2 digit years. So you should change it and all your software designed to think otherwise. That may be difficult but it's the best solution. > Does any one know if there is a database type environment variable > that will allow you to specify which 2 digit year values belong to > which century? We are looking at whether we will have to change all > our 2 digit entry year fields on date fields to 4 digits to handle > the century change. Changing to 4 digit year fields will take a > lot of work and add keystrokes to users. At our recent annual user group forum, I learned that Informix has just this kind of feature, namely DBCENTURY, in version 7.2. You can set this variable to closest year, i.e. year in the closest century (where 1/1/02 = 1/1/2002), closest past year, closest future year, and closest future year, with your date (DBDATE) environment variable set to 2-digit years. Hope this helps. Yours, Nick ********************************* Nick Nobbe, Library of Congress NLS/BPH mail: nnob@loc.gov *********************************