Returns the weekday number of a date value.
Syntax:
WEEKDAY( date {, mode:Number} )
The weekday number of date is returned in numeric form.
Usually the value 1 represents Sunday, 2 represents Monday, … and 7 represents Saturday,
but an optional mode value may be used to adjust the calculation.
| mode | |
|---|---|
| 1 | Sunday is day one, Saturday is day seven |
| 2 | Monday is day one, Sunday is day seven |
| 3 | Monday is day zero, Sunday is day six |
| 11 | Monday is day one, Sunday is day seven |
| 12 | Tuesday is day one, Monday is day seven |
| 13 | Wednesday is day one, Tuesday is day seven |
| 14 | Thursday is day one, Wednesday is day seven |
| 15 | Friday is day one, Thursday is day seven |
| 16 | Saturday is day one, Friday is day seven |
| 17 | Sunday is day one, Saturday is day seven |
| 21 | Monday is day one, Sunday is day seven (ISO 8601) |
| 150 | Monday is day one, Sunday is day seven (ISO 8601) |
Revisions:
The optional mode parameter was added in Fireworkz 2.24.
Example:
WEEKDAY(26.05.1993)
returns the number 4, which corresponds to Wednesday.
WEEKDAY(26.05.1993, 13)
returns the number 1, which also corresponds to Wednesday in that particular system.
See also DAYNAME.