Comment on page
Date.DayOfWeek
Returns a number from 1 to 7 representing the day of the week.
function (optionaldateTime
as nullable any, optionalfirstDayOfWeek
as nullable any) as nullable any
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. Date
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))
1
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)
0
Last modified 5yr ago