Re: Informix Date Arithmetic - Subtracting Months
Posted in 1998
One of our programmers had a similar problem adding 2 months. I suggested he
add 60 days which was adequate for his requirements.
Hope this helps
mzabk@my-dejanews.com wrote in message <6mrpnf$itd$1@nnrp1.dejanews.com>...
>
>
>When I run the following query, I get an error on some records:
>
>select begin_date,end_date
>end_date - begin_date,>rptend - INTERVAL(6) MONTH TO MONTH
>from table_a
>
>
>ERROR: 1267: The result of a datetime computation is out of range.
>
>I am trying to subtract 6 months from a date. It appears
>that subtracting 6 months from a date like 8/31/1997 is causing
>a problem because 02/31/1997 is not a valid date.
>
>I was wondering if someone had a work-around for this.
>
>
>Thanks,
>
>Mike
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading