Adds the specified months to the date.
function (optional
dateTime
as nullable any,numberOfMonths
as number) as nullable any
Returns the date
, datetime
, or datetimezone
result from adding numberOfMonths
months to the datetime
value dateTime
.
Date
Add 5 months to the date
, datetime
, or datetimezone
value representing the date 5/14/2011.
Date.AddMonths(#date(2011, 5, 14), 5)
Add 18 months to the date
, datetime
, or datetimezone
value representing the date and time of 5/14/2011 08:15:22 AM.
Date.AddMonths(#datetime(2011, 5, 14, 8, 15, 22), 18)