Date.AddQuarters
DateAdds a specified number of quarters to a date value.
Syntax
Date.AddQuarters(dateTime as any, numberOfQuarters as number) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
dateTime | any | Yes | The date, datetime, or datetimezone value to add quarters to. |
numberOfQuarters | number | Yes | The number of quarters to add. Use negative values to subtract quarters. |
Return Value
any — The date resulting from adding the specified number of quarters to the input value.
Remarks
Date.AddQuarters adds or subtracts a number of quarters (3-month periods) from a date, datetime, or datetimezone value. One quarter equals three months, so Date.AddQuarters(d, 1) is equivalent to Date.AddMonths(d, 3). Passing a negative numberOfQuarters subtracts quarters. The return type matches the input type.
End-of-month clamping applies: if the resulting month has fewer days than the input day, the result is clamped to the last day of that month. For example, adding one quarter to January 31 gives April 30, because April has only 30 days. This is the same behavior as Date.AddMonths.
Date.AddQuarters is most useful when working with fiscal or calendar quarter logic — for example, computing quarter-end deadlines, rolling forward subscription periods by quarter, or building prior-quarter comparison columns. For shifting by individual months, use Date.AddMonths directly, which is slightly more explicit about the unit.
Examples
Example 1: Add one quarter to a date column
Table.AddColumn(
Table.SelectColumns(
Table.FirstN(Sales, 5),
{"OrderID", "OrderDate"}
),
"WarrantyEnd", each Date.AddQuarters([OrderDate], 1), type date
)OrderID | OrderDate | WarrantyEnd | |
|---|---|---|---|
| 1 | 1 | 1/15/2024 | 4/15/2024 |
| 2 | 2 | 1/18/2024 | 4/18/2024 |
| 3 | 3 | 2/1/2024 | 5/1/2024 |
| 4 | 4 | 2/10/2024 | 5/10/2024 |
| 5 | 5 | 3/5/2024 | 6/5/2024 |
Example 2: Subtract two quarters from a date
#table(
type table [ReferenceDate = date, TwoQuartersBack = date],
{{#date(2024, 9, 30), Date.AddQuarters(#date(2024, 9, 30), -2)}}
)ReferenceDate | TwoQuartersBack | |
|---|---|---|
| 1 | 9/30/2024 | 3/30/2024 |
Example 3: Demonstrate end-of-month clamping behavior
#table(
type table [InputDate = date, PlusOneQuarter = date],
{
{#date(2024, 1, 31), Date.AddQuarters(#date(2024, 1, 31), 1)},
{#date(2024, 3, 31), Date.AddQuarters(#date(2024, 3, 31), 1)},
{#date(2024, 5, 31), Date.AddQuarters(#date(2024, 5, 31), 1)}
}
)InputDate | PlusOneQuarter | |
|---|---|---|
| 1 | 1/31/2024 | 4/30/2024 |
| 2 | 3/31/2024 | 6/30/2024 |
| 3 | 5/31/2024 | 8/31/2024 |