Documentation/Calc Functions/WEEKDAY/en

Function name:
WEEKDAY

Category:
Date and Time

Summary:
Calculates the day of the week for a date specified either by a date-time serial number or in a text string.

Syntax:
WEEKDAY(Date[; Type])

Returns:
Returns an integer in the range [0, 7] which is the day of the week for the supplied date, coded in accordance with the supplied Type argument.

Arguments:
Date is the date (in quotation marks) or a date-time serial number, or a reference to the cell containing one of those types, which is the date for which the calculation is to be carried out.

Type is an integer value in either the range [1, 3] or the range [11, 17]. Type determines the numbering scheme to be used to return the day value, with the possible schemes detailed in the following table. If Type is omitted, the value 1 is used by default.


 * If Date is not a valid date expression, then WEEKDAY reports a #VALUE! error.
 * WEEKDAY ignores any time components of Date.
 * If Type is non-numeric, then WEEKDAY reports a #VALUE! error.
 * If Type is a non-integer value, then WEEKDAY truncates the value.
 * If (after possible truncation) Type is not one of the expected values enumerated above, then WEEKDAY returns an invalid argument error (Err:502).

Related LibreOffice functions:
DAY

MONTH

YEAR

ODF standard:
Section 6.10.20, part 2

Equivalent Excel functions:
WEEKDAY