WEEKDAY

Returns the day of the week for the given date value. The day is returned as an integer between 1 (Sunday) and 7 (Saturday) if no type or type=1 is specified. For other types, see the table below.

note

This function is part of the Open Document Format for Office Applications (OpenDocument) standard Version 1.2. (ISO/IEC 26300:2-2015)


Syntax

WEEKDAY(Number [; Type])

АргумСнт число Π² качСствС значСния Π΄Π°Ρ‚Ρ‹ являСтся дСсятичным прСдставлСниСм, для ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ³ΠΎ Π΄ΠΎΠ»ΠΆΠ΅Π½ Π±Ρ‹Ρ‚ΡŒ Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π΅Π½ Π½ΠΎΠΌΠ΅Ρ€ дня Π½Π΅Π΄Π΅Π»ΠΈ.

Type is optional and determines the type of calculation.

Type

Weekday number returned

1 or omitted

1 (Sunday) through 7 (Saturday). For compatibility with Microsoft Excel.

2

1 (Monday) through 7 (Sunday).

3

0 (Monday) through 6 (Sunday)

11

1 (Monday) through 7 (Sunday).

12

1 (Tuesday) through 7 (Monday).

13

1 (Wednesday) through 7 (Tuesday).

14

1 (Thursday) through 7 (Wednesday).

15

1 (Friday) through 7 (Thursday).

16

1 (Saturday) through 7 (Friday).

17

1 (Sunday) through 7 (Saturday).


note

These values apply only to the standard date format that you select under - LibreOffice Calc - Calculate.


note

ΠŸΡ€ΠΈ Π²Π²ΠΎΠ΄Π΅ Π΄Π°Ρ‚ ΠΊΠ°ΠΊ части Ρ„ΠΎΡ€ΠΌΡƒΠ», косыС Ρ‡Π΅Ρ€Ρ‚Ρ‹ ΠΈΠ»ΠΈ Ρ‚ΠΈΡ€Π΅, ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΡ‹Π΅ Π² качСствС Ρ€Π°Π·Π΄Π΅Π»ΠΈΡ‚Π΅Π»Π΅ΠΉ Π΄Π°Ρ‚, ΠΈΠ½Ρ‚Π΅Ρ€ΠΏΡ€Π΅Ρ‚ΠΈΡ€ΡƒΡŽΡ‚ΡΡ ΠΊΠ°ΠΊ арифмСтичСскиС ΠΎΠΏΠ΅Ρ€Π°Ρ‚ΠΎΡ€Ρ‹. ΠŸΠΎΡΡ‚ΠΎΠΌΡƒ Π΄Π°Ρ‚Ρ‹, Π²Π²Π΅Π΄Π΅Π½Π½Ρ‹Π΅ Π² этом Ρ„ΠΎΡ€ΠΌΠ°Ρ‚Π΅, Π½Π΅ Ρ€Π°ΡΠΏΠΎΠ·Π½Π°ΡŽΡ‚ΡΡ ΠΊΠ°ΠΊ Π΄Π°Ρ‚Ρ‹ ΠΈ приводят ΠΊ ΠΎΡˆΠΈΠ±ΠΎΡ‡Π½Ρ‹ΠΌ вычислСниям. Π§Ρ‚ΠΎΠ±Ρ‹ Π΄Π°Ρ‚Ρ‹ Π½Π΅ ΠΈΠ½Ρ‚Π΅Ρ€ΠΏΡ€Π΅Ρ‚ΠΈΡ€ΠΎΠ²Π°Π»ΠΈΡΡŒ ΠΊΠ°ΠΊ части Ρ„ΠΎΡ€ΠΌΡƒΠ», ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΡŽ DATE, Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€ DATE (1954;7;20) ΠΈΠ»ΠΈ помСститС Π΄Π°Ρ‚Ρƒ Π² ΠΊΠ°Π²Ρ‹Ρ‡ΠΊΠΈ ΠΈ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ Π½ΠΎΡ‚Π°Ρ†ΠΈΡŽ ISO 8601, Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€ "1954-07-20". Π˜Π·Π±Π΅Π³Π°ΠΉΡ‚Π΅ использования Ρ„ΠΎΡ€ΠΌΠ°Ρ‚ΠΎΠ² Π΄Π°Ρ‚Ρ‹, зависящих ΠΎΡ‚ Π»ΠΎΠΊΠ°Π»ΡŒΠ½Ρ‹Ρ… настроСк, Ρ‚Π°ΠΊΠΈΡ… ΠΊΠ°ΠΊ "07/20/54", расчёт ΠΌΠΎΠΆΠ΅Ρ‚ привСсти ΠΊ ошибкам, Ссли Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ Π·Π°Π³Ρ€ΡƒΠΆΠ΅Π½ Π² соотвСтствии с ΠΈΠ½Ρ‹ΠΌΠΈ Π»ΠΎΠΊΠ°Π»ΡŒΠ½Ρ‹ΠΌΠΈ настройками.


tip

Unambiguous conversion is possible for ISO 8601 dates and times in their extended formats with separators. If a #VALUE! error occurs, then unselect Generate #VALUE! error in - LibreOffice Calc - Formula, button Details... in section "Detailed Calculation Settings", Conversion from text to number list box.


Example

=WEEKDAY("2000-06-14") returns 4 (the Type parameter is missing, therefore the standard count is used. The standard count starts with Sunday as day number 1. June 14, 2000 was a Wednesday and therefore day number 4).

=WEEKDAY("1996-07-24";2) returns 3 (the Type parameter is 2, therefore Monday is day number 1. July 24, 1996 was a Wednesday and therefore day number 3).

=WEEKDAY("1996-07-24";1) returns 4 (the Type parameter is 1, therefore Sunday is day number 1. July 24, 1996 was a Wednesday and therefore day number 4).

=WEEKDAY("2017-05-02";14) returns 6 (the Type parameter is 14, therefore Thursday is day number 1. May 2, 2017 was a Tuesday and therefore day number 6)

=WEEKDAY(NOW()) returns the number of the current day.

tip

To obtain a function indicating whether a day in A1 is a business day, use the IF and WEEKDAY functions as follows:
IF(WEEKDAY(A1;2)<6;"Business day";"Weekend")


Π€ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π”Π°Ρ‚Π° ΠΈ ВрСмя

DATE

DATEDIF

DATEVALUE

DAY

DAYS

DAYS360

EASTERSUNDAY

EDATE

EOMONTH

HOUR

[text/scalc/01/func_isoweeknum.xhp#isoweeknum not found].

MINUTE

MONTH

NETWORKDAYS

NETWORKDAYS.INTL

NOW

SECOND

TIME

TIMEVALUE

TODAY

WEEKDAY

WEEKNUM

WEEKNUM_ADD

[text/scalc/01/func_weeknum_ooo.xhp#weeknum_ooo not found].

WORKDAY

WORKDAY.INTL

YEAR

YEARFRAC