Date.DayOfWeek(**dateTime** as any, optional **firstDayOfWeek** as nullable number) as nullable number
Returns a number between 0 and 6 representing the day of the week in the provided datetime value
dateTime. This function takes an optional Day value,
firstDayOfWeek, to set the first day of the week for this relative calculation. The default value firstDay is Day.Sunday. Valid values are: Day.Sunday, Day.Monday, Day.Tuesday, Day.Wednesday, Day.Thursday, Day.Friday, and Day.Saturday.
datetimezonevalue from which the day of the week is determined.
Daytype representing the first day of the week for this calculation.
Get which the day of the week February 21st, 2011 falls on, with (default) Sunday being the first day of the week.
Date.DayOfWeek(#date(2011, 02, 21))
Get which day of the week February 21st, 2011 falls on, with Monday being the first day of the week.
Date.DayOfWeek(#date(2011, 02, 21), Day.Monday)