WEEKDAY

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
1Sunday is day one, Saturday is day seven
2Monday is day one, Sunday is day seven
3Monday is day zero, Sunday is day six
11Monday is day one, Sunday is day seven
12Tuesday is day one, Monday is day seven
13Wednesday is day one, Tuesday is day seven
14Thursday is day one, Wednesday is day seven
15Friday is day one, Thursday is day seven
16Saturday is day one, Friday is day seven
17Sunday is day one, Saturday is day seven
21Monday is day one, Sunday is day seven (ISO 8601)
150Monday 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.