Date.AddMonths

 

This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Returns a DateTime value with the month portion incremented by n months.

Date.AddMonths(dateTime as datetime, numberOfMonths as number) as nullable datetime  

ArgumentDescription
dateTimeThe DateTime to add months to.
numberOfMonthsThe number of months to add.
  • It also handles incrementing the year portion of the value as appropriate.
Date.AddMonths(DateTime.FromText("2011-02-19"), 5) equals 2011-07-19  

Date.AddMonths(DateTime.FromText("2010-12-01"), 2) equals 2011-02-01  

Show: