Re: Date Fields Entered: MM/DD/YY Stored: MM/DD/YYYY
Posted in 1994
> General question... If Informix was going to make it configurable, how > should the configuration be handled? Have some date, eg 49, where a > 2-digit year less than that is 20xx, and later than that is still 19xx? > Set by environment variable? Or some other technique? > > Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> > I would recommend an environment variable with a full date default of before 01/01/50 but I would also like to see a SET command that could make the change within a program. Something along the lines of: set century to next for dates before <date-variable> set century to next for dates before "01/01/50" It might also be needed, for some applications, to provide a rolling feature so that all dates entered where the year or even the date is in the past the assumption is made that the date is in the next century. This can be achieved using the same forms: set century to next for dates before today DBCENTURY='date +%D' I think this should cope with most requirements as any applications that deal with real historical or future dates will be using YYYY already. Any comments, suggestions? Cheers - Jim My opinions are my own. They may vary with time but they remain MINE! ---------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 375-5222 (Work) Address: 700 Airport Blvd. #300 (415) 775-7762 (Home) Burlingame, CA 94010-1937 Fax: (415) 375-5019 ----------------------------------------------------------------------