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.
You can use all data types containing a date.
weekday(date(2021, 12, 31))
Result: 4 (= Friday)
Result: 4 (= Friday, on Dec 31, 2021)
if weekday(date1) > 4 then "Weekend" else "Business day" end;
Result: Weekend (on May 1, 2021) with date1 being a field in your table.