To return the weekday of a given date value as a number
With this function, you can determine the corresponding weekday from a date value.
The weekday is a number with Monday = 0, Tuesday = 1, ... Sunday = 6.
Therefore, you can check if a particular date should be a workday (for example Monday to Friday) or a weekend day.
Note: It's not taking specific holidays into account.
You can use all data types containing a date.
weekday(date)
weekday(timestamp)
weekday(appointment)
number
Result: 4 (= Friday)
Result: 4 (= Friday, on Dec 31, 2021)
Result: Weekend (on May 1, 2021) with date1 being a field in your table.
weedayIndex
, which returns a given weekday name as a number.
weekdayName
, which returns the full weekday name of a given date value.