| United States-English |
|
|
|
![]() |
ALLBASE/SQL Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 ExpressionsAdd Months Function |
|
The Add Months function uses the keyword ADD_MONTHS to apply the addition operation to a DATE or DATETIME expression. It is different from a simple addition operator in that it adjusts the day field in the DATE or DATETIME value to the last day of the month if adding the months creates an invalid date (such as '1989-02-30').
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) |
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||