DATETIME
Posted in 1995
>Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> writes: >It is irritating (to me) to have to admit, therefore, that the 4.1, 5.0, >6.0 and 7.1 Informix Guide to SQL Reference manuals all cite the example >below (see pages 3-22, 3-22, 3-25, 3-33): > > DATETIME(1991-08-01) YEAR TO DAY + INTERVAL(3-5) YEAR TO MONTH > Result: DATETIME(1995-01-01) YEAR TO DAY >Change the base DATETIME to DATETIME(1991-09-30) and the computation will >fail with the -1267 error. That makes it, in my view, a poor example. I also >think the computation should fail in all cases, not just at the end of a month. >This view, obviously, does not match what appears in the documentation -- >hence my disclaimer at the top of this message, and the repeat down here at >the bottom: what I say in this case must not be represented under any >circumstances as official Informix policy on the subject. Someone once told me; "Its not whats in the manauals that can hurt you, its whats not in them that you have to look out for". I too read the above example, and believed that it would work for all cases. Informix has an offical view on this that should be included in the manuals. Has anyone written a function to handle this that they can share? I wrote one once at another site but never saved it. || ======= **** **T* ======= ||John Regep || **** **** ||Store Systems Developement || **** *R** ||Kmart Corporation || =========== ********* =========== ||3100 West Big Beaver || ***A* **** ||Troy, MI 48084 || **** **** ||(810) 643-5078 ||=============== *M** **** ===============||uunet!kmart!jregep