Date.StartOfWeek

Syntax

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

About

Returns the first value of the week given a date, datetime, or datetimezone value.

Example 1

Find the start of the week for October 10th, 2011, 8:10:32AM (#datetime(2011, 10, 10, 8, 10, 32)).

Date.StartOfWeek(#datetime(2011, 10, 10, 8, 10, 32))

#datetime(2011, 10, 9, 0, 0, 0)