Power Query
Search…
Date.EndOfMonth

Date.EndOfMonth

Returns the last day of the month.
function (optional dateTime as nullable any) as nullable any

Description

Returns the last day of the month in dateTime.

Category

Date

Examples

Get the end of the month for 5/14/2011.
Date.EndOfMonth(#date(2011, 5, 14))

date(2011, 5, 31)

Get the end of the month for 5/17/2011 05:00:00 PM -7:00.
Date.EndOfMonth(#datetimezone(2011, 5, 17, 5, 0, 0, -7, 0))

datetimezone(2011, 5, 31, 23, 59, 59.9999999, -7, 0)

Copy link
On this page
Date.EndOfMonth
Description
Category
Examples