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