Re: Date calculation functions : Informix bug?
Posted in 1996
In article <5408pv$i9u@cssun.mathcs.emory.edu>, jparker@boi.hp.com (Jack Parker) wrote: > ##################################################################### > FUNCTION Add_Month (bdate, num_months) > > DEFINE bdate, edate DATE, num_months SMALLINT > > LET edate = bdate + num_months UNITS MONTH > RETURN edate > > END FUNCTION I am running Informix 4.1 tools at our site and we, some six months back, joyfully changed our date computation code to use syntax similar to the above. Unfortunately it does not work. e.g '31/10/96 + 1 UNITS MONTH' gives an error (Form 1267 : The result of a datetime computation is out of range) Informix seems to be trying to return 31/11/96 The same problem occurs with UNITS YEAR if a leap year is involved. I'm curious to know if this is a version 4.1 problem alone. Rudy