portableSql
AddMonthsToDate Portable SQL Function
Syntax
AddMonthsToDate as D (Date as D, NrOfMonths as N)
Arguments
- DateDate
A field or value.
- NrOfMonthsNumeric
Number of months to add.
Returns
- resultDate
Returns a date NrOfMonths ahead of Date.
Description
Get the date value NrOfMonths months ahead of Date.
Discussion
The AddMonthsToDate function computes a new date by adding months to a date field.
AddMonthsToDate() function executed on the Northwind Access database
SELECT FIRST 1 CurrentDate() AS Now, AddMonthsToDate(CurrentDate(), 4) AS Expr1 FROM Orders =10/10/2019 12:00:00 00 am|02/10/2020 12:00:00 00 am