Re: Is this an informix leap year bug?
Posted in 2000
Topics: General Discussion
> select date(today - interval(1) year to year) from systables where tabid =
> 1;
>
> and get
>
> 1267: The result of a datetime computation is out of range.>
> Is this a bug with the database? Shouldn't it automatically return
> 02/28/1999 in this case?
No, it's not a bug. How is the engine going to know if you want
2/28/99 or 3/1/99?
Chuck Renaud wrote:
>
> > select date(today - interval(1) year to year) from systables where tabid =
> > 1;
> >
> > and get
> >
> > 1267: The result of a datetime computation is out of range.> >
> > Is this a bug with the database? Shouldn't it automatically return
> > 02/28/1999 in this case?
>
> No, it's not a bug. How is the engine going to know if you want
> 2/28/99 or 3/1/99?
Of course, date(today - 365 units day) might get around the issue,
except in a leap year . . . 8-)
--
John Carlson
Informix DBA
WHSmith USA
#include std_disclaimer.h /* These are my opinions, not my company's
opinion */