• Doing arithmetic with ANSI dates

    From Roy Hann@21:1/5 to All on Wed Oct 27 19:53:09 2021
    I'm well used to doing arithmetic with the native Ingres DATE
    (INGRESDATE) type, e.g.:

    SELECT birthdate + '3 months' FROM...

    If birthdate is an ANSI date (ANSIDATE) the above still works
    perfectly well.

    But I doubt that is idiomatic ISO/ANSI SQL. I've Googled a bit and found
    all kinds of syntax being used. I suspect ...+'3 months' or ...-'49
    days' might not work reliably outside of Ingres.

    So is there anything that does work reliably? Google is not being super
    helpful on this... Maybe I haven't guessed the best search term


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)