Re: YEAR 2000
Posted in 1997
On Mon, 24 Nov 1997, Michal Hajek wrote:
> MIS Dept wrote:
> > Fco. Javier de la Fuente Ruiperez wrote:
> > > If i write the date 18/02/00. Informix set year to 1900 and not 2000.
> > > How i can resolve this? Exist a variable DBCENTURY
> >
> > Depends on which version of Informix OnLine you're using. I believe the
> > version which first includes DBCENTURY is 7.2x.
> >
> > Of course, SQL and 4GL aren't able to take advantage of this variable
> > yet. The updated releases are due 1997/4Q according to Informix.
Version 4.20 of I4GL should be available now on at least some platforms.
The matching 6.10 version is due out in 98Q1.
> WHAT program are talking about ? I suppose you write the date in
> some kind of client, and it is on its own how it deals with
> non-century date.
More or less.
> I believe it then sends the date as integer (to OnLine).
Usually, but not invariably. That is, you can write code where the
conversion is done by the engine, but it is not often that you do it
in I4GL.
> Remember, DBCENTURY is client variable.
NO! DBCENTURY is handled by both the client and the server. If the
string to date conversion is done in the client code (eg an I4GL INPUT
statement), then the behaviour depends on whether the client tool is
aware of DBCENTURY. If the date is sent to the engine as a string (eg
INSERT INTO SomeTable VALUES('01/01/00')), then the engine converts thestring to a date and the behaviour depends on whether the engine is
aware of DBCENTURY.
> PS: to your question: what was your system date ? Did you set it to
> something after 2000 when trying to enter the date ?
This would make no difference. In the pre-DBCENTURY releases of
Informix software, 1900 was added to any 2-digit year value, regardless
of the current year.
Yours,
Jonathan Leffler (johnl@informix.com) #include <witticism.h>