Downloads
Power Query MDateBeginner

Date.AddWeeks

Adds a number of weeks to a date, or subtracts them when the number is negative.

Syntax
Date.AddWeeks(dateOrDateTime as any, numberOfWeeks as number) as any

Returns: The new date, or null when the input is null.

What it does

Date.AddWeeks moves a date by whole weeks. It is the function for a schedule that repeats every week or every two weeks, such as biweekly payroll dates or a weekly lease payment. A week is always seven days, so the result is the same as adding seven times the number of weeks with Date.AddDays.

Syntax and arguments

Example

A company pays its staff every two weeks. The payroll team lists the pay dates for the next quarter from the first pay date in the year.

let
    FirstPayDate = #date(2026, 1, 9),
    PayDates = List.Transform({0..5}, each Date.AddWeeks(FirstPayDate, _ * 2)),
    AsTable = Table.FromList(PayDates, Splitter.SplitByNothing(), {"PayDate"}, null, ExtraValues.Error)
in
    AsTable

The list starts on January 9, 2026 and moves forward two weeks at a time, so the six pay dates run from January 9 to March 20, 2026. Each date is exactly fourteen days after the one before.

Example: a second, different use

Find the date of the last Friday of a four week cycle by adding a set number of weeks to the cycle start.

Things to watch

In business terms

Biweekly payroll, weekly rent and recurring vendor payments are scheduled in weeks. A consistent schedule built from one start date keeps the cash forecast and the payroll calendar aligned.

Related functions

All Power Query M functions · View as Markdown · M basics