Re: DATES MANAGEMENT ON C-ISAM 5.00
Posted in 1999
MC
This is expected behavior. To make Informix auto-magically determine the century
correctly, you need to tell it how. This is done by the DBCENTURY environment
variable and I think its supported in 7.20. Setting it to C (closest) will cause
it to interpret the dates you fed it correctly. For that add this line to the
/etc/profile (so all users who use the database have the benefit of the
setting).
DBCENTURY=C; export DBCENTURY
There are other settings for DBCENTURY. To determine which one you need, RTFM.
Of course, its safest to just use 4 digit years in your code.
HTH
Sujit
MC <massimo.corradiNOmaSPAM@iconeurope.com.invalid> on 11/19/99 03:12:13 AM
Please respond to MC <massimo.corradiNOmaSPAM@iconeurope.com.invalid>
To: informix-list@iiug.org
cc: (bcc: Sujit Pal)
Subject: DATES MANAGEMENT ON C-ISAM 5.00
We have an Informix database.
The version is: C-ISAM 5.00.UC1
The SQL interface version is: 7.20.UD1
THIS IS THE ".profile" for user INFORMIX
************************************************************
**********************
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/informix
/data/informix.upg/bin:.
TERMCAP=/usr/informix/etc/termcap
TERM=wyse60
INFORMIXSERVER=icon_db
INFORMIXDIR=/usr/informix/data/informix.upg
DBDATE=dmy4/DBTEMP=/usr/informix/data/tmp
export PATH TERM TERMCAP INFORMIXSERVER DBDATE DBTEMPINFORMIXDIR
************************************************************
**********************
Our problem is:
if I run the following query (where podet is a dummy table):
select date("10/11/99") from podet
I have: 10/11/1999
but if I run:
select date("10/11/00") from podet
I have: 10/11/1900
Is there any help you can give me?
Thank you
* Sent from AltaVista http://www.altavista.com Where you can also find related
Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful