Date.EndOfMonth

This function retrieves the last day of the month that includes the specified dateTime.dateTime. The input can be a date, datetime, or datetimezone value that is used to determine the end of the month...

Syntax

Date.EndOfMonth(dateTime as any) as any

About

This function retrieves the last day of the month that includes the specified dateTime.dateTime. The input can be a date, datetime, or datetimezone value that is used to determine the end of the month.

Explanation

Retrieve the last day of the month for May 14, 2011. To do this, utilize Power Query with the function MDate.EndOfMonth(#date(2011, 5, 14)). The result will display #date(2011, 5, 31). Obtain the final moment of the month for May 17, 2011 at 5:00:00 PM with a time zone offset of -7:00. In order to achieve this, use Power Query with the function MDate.EndOfMonth(#datetimezone(2011, 5, 17, 5, 0, 0, -7, 0)). The output will show #datetimezone(2011, 5, 31, 23, 59, 59.9999999, -7, 0).