Date.DaysInMonth

This function determines the amount of days in the month for the specified date, datetime, or datetimezone value dateTime.dateTime. The input should be a date, datetime, or datetimezone value.

Syntax

Date.DaysInMonth(dateTime as any) as nullable number

About

This function determines the amount of days in the month for the specified date, datetime, or datetimezone value dateTime.dateTime. The input should be a date, datetime, or datetimezone value.

Explanation

The number of days in December is calculated using the formula #date(2011, 12, 01) in Power Query function MDate.DaysInMonth(). The result is 31 days in the month of December.