Returns the last day of the week.
dateTimeas nullable any, optional
firstDayOfWeekas nullable any) as nullable any
Returns the last day of the week in the provided
dateTime. This function takes an optional
firstDayOfWeek, to set the first day of the week for this relative calculation. The default value is
Get the end of the week for 5/14/2011.
Date.EndOfWeek(#date(2011, 5, 14))
Get the end of the week for 5/17/2011 05:00:00 PM -7:00, with Sunday as the first day of the week.
Date.EndOfWeek(#datetimezone(2011, 5, 17, 5, 0, 0, -7, 0), Day.Sunday)