Re: Informix Date Arithmetic - Subtracting Months
Posted in 1998
Must be the day for it. I happen to have a routine to this properly as
well. I'll be sure to snag it for you.
cheers
j.
"Andrew Mercer" <amercer@wsl.com.au> on 06/24/98 08:20:28 PM
Please respond to "Andrew Mercer" <amercer@wsl.com.au>
To: informix-list@iiug.org
cc: (bcc: Jack Parker/Boston50/Epsilon)
Subject: Re: Informix Date Arithmetic - Subtracting Months
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