ALLBASE/SQL Reference Manual (36216-90216)

Chapter 8 235
Expressions
Add Months Function
example, '1989-02-31'). In this case, the day is set to the last day of the month for that
year, and ALLBASE/SQL generates a warning indicating the adjustment.
If either parameter is NULL, ADD_MONTHS will evaluate to NULL also.
Example
In this example, rows are returned which comprise the batch stamp and test date that
have a pass quantity less than 48. A warning is generated because 7 months added to the
'1984-07-30' date results in an invalid date, '1985-02-30'.
SELECT BatchStamp, ADD_MONTHS(TestDate,7)
FROM ManufDB.TestData
WHERE PassQty <= 48
ADD_MONTHS result adjusted to last day of month. (DBWARN 2042)