Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Do Subtracting _2 units month_ yiels the same results?
Chucho
June C. Hunt wrote:
> Irfan Bondre wrote:
>
>>SELECT ( TO_DATE( '1995-04-30 00:00:00') + INTERVAL(-2) MONTH TO MONTH)
>>from table ( set {1} )
>>Returns the following error
>>SQLSTATE = S1000
>>NATIVE ERROR = -1267
>>MSG = [DataDirect][ODBC Informix Wire Protocol driver][Informix]-1267
>>
>>
>>This is because substracting 2 Months from '1995-04-30 00:00:00' results in
>>'1995-02-30 00:00:00' i.e february 30, which doesn't eixt. Hence the error.
>>
>>Any way around.
>
>
> One common suggestion is to work in days, not months. There is, of
> course, plenty to worry about with that solution. Do a Google search
> within c.d.i. - there is plenty of discussion about this particular issue.
>
> --
> June Hunt
>
sending to informix-list
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.