Date.AddWeeks

Updated on

Date.AddWeeks is a function in the Power Query M language that adds a specified number of weeks to a date or datetime value. The resulting value is returned as a date, datetime, or datetimezone.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Date.AddWeeks(
   dateTime as any,
   numberOfWeeks as number,
) as any

Description

Date.AddWeeks adds a specified number of weeks to a given dateTime (of type date, datetime, or datetimezone) and requires a numberOfWeeks argument.

Examples

Add 2 weeks to the date, datetime, or datetimezone value representing the date 5/14/2011.

// Output: #date( 2011, 5, 28 )
Date.AddWeeks( #date( 2011, 5, 14 ), 2 )

Other functions related to Date.AddWeeks are:

BI Gorilla Blog

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/date-addweeks