DB Century 
Author Message
 DB Century
I am currently using a very old version of Informix 4.10.UC2 ...
I know it's very old , but it still works for us / except for a report date
problem
I have been having since  Feb, 29th  . I t doesn't recognize a leap year.
All of my report dates are one day ahead .   How can I fix this problem?
I heard about  a DBcentury command but I don't have any additional info on
it!

smosley



Wed, 18 Jun 1902 08:00:00 GMT
 DB Century

Quote:

> I am currently using a very old version of Informix 4.10.UC2 ...
> I know it's very old , but it still works for us / except for a report date
> problem
> I have been having since  Feb, 29th  . I t doesn't recognize a leap year.
> All of my report dates are one day ahead .   How can I fix this problem?
> I heard about  a DBcentury command but I don't have any additional info on
> it!

DBCENTURY is supported by OL5.10+, IDS7.24UC8+, IDS7.30UC2+,
IDS7.31, IDS 9.2x.  It is a newly added environment variable to control the
interpretation of 2 digit dates on input to better handle Y2K problems.  It
will not
fix the 2/29/2000 bug which existed in all Informix products released before
December 1999 or so.  Your engine does not realise that 2000 is a leap year and

so all dates after 2/28/2000 are off by 1 day.   There is nothing you can do
except
update all rows with a date after that and reduce the day by 1 or upgrade to a
newer version.  There ARE many advantages to the newer Informix versions not
the least of which is ongoing support including bug fixes.  OL4.10 was
desupported
over 7 years ago.

Art S. Kagel



Wed, 18 Jun 1902 08:00:00 GMT
 DB Century
DBCENTURY is an environment variable setting but your 4.10 database will not
recognize it.  I am not familiar with this specific problem on 4.10 but I am
not surprised and recommend you upgrade to at least version 5.10...

Hal Maner
M Systems International, Inc.
www.msystemsintl.com


Quote:
> I am currently using a very old version of Informix 4.10.UC2 ...
> I know it's very old , but it still works for us / except for a report
date
> problem
> I have been having since  Feb, 29th  . I t doesn't recognize a leap year.
> All of my report dates are one day ahead .   How can I fix this problem?
> I heard about  a DBcentury command but I don't have any additional info on
> it!

> smosley



Wed, 18 Jun 1902 08:00:00 GMT
 DB Century


Quote:

>I am currently using a very old version of Informix 4.10.UC2 ...
>I know it's very old , but it still works for us / except for a report date
>problem
>I have been having since  Feb, 29th  . I t doesn't recognize a leap year.
>All of my report dates are one day ahead .   How can I fix this problem?
>I heard about  a DBcentury command but I don't have any additional info on
>it!

DBCENTURY won't help you. What will help you is an upgrade to a
Y2K-compliant version.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Wed, 18 Jun 1902 08:00:00 GMT
 DB Century

DBCENTURY is not applicable to your version.  You should upgrade
to a higher version. And if I am not mistaken the version of Informix
you have is no longer being supported.

Don

Quote:

> I am currently using a very old version of Informix 4.10.UC2 ...
> I know it's very old , but it still works for us / except for a report date
> problem
> I have been having since  Feb, 29th  . I t doesn't recognize a leap year.
> All of my report dates are one day ahead .   How can I fix this problem?
> I heard about  a DBcentury command but I don't have any additional info on
> it!

> smosley



Wed, 18 Jun 1902 08:00:00 GMT
 DB Century
I had exactly the same problem! (recently upgraded from 4.10 to 7.20, so I
no longer do).

However, before I upgraded (2 months AFTER the leap year), I used this
workaround:

I created a table called "today" with the following fields:

Column name          Type                                    Nulls

dummy                char(1)                                 no
curdate              date                                    yes
wdaynum              smallint                                yes
dayname              char(9)                                 yes
dayabbr              char(3)                                 yes

with a unique index on dummy.

Then wrote the following SQL script (settoday.sql):

delete from today
where dummy="1";

load from "/tmp/today.dat"
insert into today;

Then, I put this script in my crontab to be executed every day at midnight:

#!/bin/sh
/bin/date +"1|%m/%d/%Y|%w|%A|%a" > /tmp/today.dat
dbaccess mydb settoday.sql 2> /dev/null

Finally, in my ace reports, I pulled the current date like this:

select
    fields...,
    today.curdate
from
    tables...,
    today
where
    somedate = curdate (instead of using "current date" or "today")

No join condition is necessary on the "today" table since it only has one
record.

This makes writing ace reports a bit more of a pain, but it works.  You can
also make it work with your 4gl programs by modifing the code and
recompiling them.

Sadly, it was the 4gl files that made me upgrade (with 500,000 lines of
code, I would have had to change THOUSANDS of instances of the "today"
variable).  I still had to recompile everything since the 4gl interpreter
with 7.20 won't read 4.10's pcode, but at least I didn't have to rewrite the
4gl files.

Good luck.

    -- Jeff Poulin


Quote:

> DBCENTURY is not applicable to your version.  You should upgrade
> to a higher version. And if I am not mistaken the version of Informix
> you have is no longer being supported.

> Don


> > I am currently using a very old version of Informix 4.10.UC2 ...
> > I know it's very old , but it still works for us / except for a report
date
> > problem
> > I have been having since  Feb, 29th  . I t doesn't recognize a leap
year.
> > All of my report dates are one day ahead .   How can I fix this problem?
> > I heard about  a DBcentury command but I don't have any additional info
on
> > it!

> > smosley



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. Y2K - default century is 19xx in 21st century.

2. Date value from DB doesn't contain century

3. retreiving century from a datetime column on SQL6.5 using RDO

4. How can I display the century in all datefields

5. changing twentyfirst century to twentieth

6. century-compliant accept command

7. retrieving century from a datetime column using sql 6.5 and rdo

8. date century compliant using accept

9. Century the most Troublesome Pair -- Foxpro 2.6 and SQL

10. Dates are in the wrong Century

11. Date - set century

12. Reading the century...?


 
Powered by phpBB® Forum Software