SheetRocks
Documentation/Formulas/WEEKDAY

WEEKDAY

Returns the number that corresponds to the week of provided date.

Syntax

WEEKDAY(date, [return_type])

Arguments

Argument Description Required
date A date within the week Required
return_type A number that determines which day is considered the first day of the week. Defaults to 1. Optional

Examples

Get weekday for specific date (Sunday = 1)

=WEEKDAY(A1)
Result ⇒ 2
A
1 2024-01-15

Get weekday with Monday as first day

=WEEKDAY(A1, 2)
Result ⇒ 1
A
1 2024-01-15

Check if date is weekend

=OR(WEEKDAY(A1)=1, WEEKDAY(A1)=7)
Result ⇒ true
A
1 2024-01-14

Related Functions

Other Date/Time functions:


← Back to Formula Reference