Date.WeekOfMonth

This function returns a numerical value between 1 and 6, indicating the specific week within the month that corresponds to the given datetime value. The input parameter "dateTime" is a specific dateti...

Syntax

Date.WeekOfMonth(dateTime as any, optional firstDayOfWeek as nullable number) as nullable number

About

This function returns a numerical value between 1 and 6, indicating the specific week within the month that corresponds to the given datetime value. The input parameter "dateTime" is a specific datetime value for which the week-of-the-month is calculated.

Explanation

Identify the specific week in March 2011 in which the 15th day falls using Power Query function MDate.WeekOfMonth(#date(2011, 03, 15)). The output will be 3.