Re: DBCENTURY...DBDATE...DATETIME...let's be clear about this
Posted in 1998
Ian Clark wrote: > Would I be correct in saying that without the DBCENTURY environment > variable then regardless of whether the user enters the century > postion of a date then we still have a problem. Informix can handle dates with any century (within the limits of the LONG datatype), so Year 2000 compliance is a non-issue within Informix. > Indeed, is it a necessity to have DBCENTURY to be Year 2000 compliant? That depends on your applications, your forms, the DBDATE environ- ment variable and your user's habits. As long as the century is always entered for all dates, i.e. 4-digit years are always used, then you are fine. The problems arise when dates are only entered with 2-digit years. How should Informix know which century the user REALLY means? Mind-reading is one of the features still on the wish-list. That's where DBCENTURY comes in: You can set the behavior of Informix in the case of 2-digit years with that variable. If your version doesn't support DBCENTURY, or it isn't set, then all 2-digit years are saved as 20th century dates. With DBCENTURY support, you can determine which century is assumed for which cases. The best way to avoid Y2K-Problems in Informix is to always use 4-digit years in all date fields. DBCENTURY is not always the answer! In my environment (medical data processing), there are many cases where even DBCENTURY wouldn't help when 2-digit years are used. Imagine having to schedule an operation on 01/01/2001 for a person who was born on 02/02/1910. Or even handling persons over 100 years of age, whose number is increasing! Regards, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3413 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | GSM : +49-172-8933578 | +--------------------------+------------------------------------------+