Date.StartOfQuarter
The first day of the calendar quarter a date falls in.
Group: Dates and times. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Date.StartOfQuarter(dateTime as any) as any
| Parameter | Type | Description |
|---|---|---|
dateTime | any | A date, datetime or datetimezone value; null gives null. |
Returns
any. The same kind of value, on 1 January, 1 April, 1 July or 1 October.
Remarks
- For a datetime or datetimezone the answer is at midnight, 00:00:00, with any offset kept.
Examples
The quarter of an August sale
Date.StartOfQuarter(#date(2024, 8, 20))
#date(2024, 7, 1)
A datetime
Date.StartOfQuarter(#datetime(2024, 11, 5, 16, 45, 0))
#datetime(2024, 10, 1, 0, 0, 0)
Related functions
Date.EndOfQuarter, Date.QuarterOfYear, Date.StartOfMonth, Date.AddQuarters.