Date.EndOfWeek

Syntax

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

Description

Returns the last day of the week in the provided date, datetime, or datetimezone dateTime. This function takes an optional Day, firstDayOfWeek, to set the first day of the week for this relative calculation. The default value is Day.Sunday.

Reference Data

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference

Power Query M Functions / Date Functions / Date.EndOfWeek