Date.QuarterOfYear

This function determines the quarter of the year in which a specified date falls. The function returns a number between 1 and 4, representing the quarter. The input parameter, 'dateTime,' can accept v...

Syntax

Date.QuarterOfYear(dateTime as any) as nullable number

About

This function determines the quarter of the year in which a specified date falls. The function returns a number between 1 and 4, representing the quarter. The input parameter, 'dateTime,' can accept values of date, datetime, or datetimezone.

Explanation

Determine the quarter of the year in which the date #date(2011, 12, 31) falls by utilizing the Power Query M function MDate.QuarterOfYear(#date(2011, 12, 31)). The output will be 4.