WORKDAY.INTL

The result is a date number that can be formatted as a date. User can see the date of a day that is a certain number of workdays away from the start date (before or after). There are options to define weekend days and holidays. The optional weekend parameter (or a string) can be used to define the weekend days (or the non-working days in each week). Also, optionally, the user can define a holiday list. The weekend days and user-defined holidays are not counted as working days.

语法

WORKDAY.INTL(StartDate; Days; Weekend; Holidays)

StartDate is the date from when the calculation is carried out. If the start date is a workday, the day is included in the calculation. This is required.

Days is the number of workdays. Positive value for a result after the start date, negative value for a result before the start date.

Weekend is an optional parameter – a number or a string used to specify the days of the week that are weekend days and are not considered working days. Weekend is a weekend number or string that specifies when weekends occur. Weekend number values indicate the following weekend days:

Number 1 to 7 for two-day weekends and 11 to 17 for one-day weekends.

数字

休息日

1 或忽略

周六与周日

2

周日与周一

3

周一与周二

4

周二与周三

5

周三与周四

6

周四与周五

7

周五与周六

11

仅周日

12

仅周一

13

仅周二

14

仅周三

15

仅周四

16

仅周五

17

仅周六


Weekend string provides another way to define the weekly non-working days. It must have seven (7) characters – zeros (0) for working day and ones (1) for non-working day. Each character represents a day of the week, starting with Monday. Only 1 and 0 are valid. “1111111” is an invalid string and should not be used. For example, the weekend string “0000011” defines Saturday and Sunday as non-working days.

Holidays is an optional list of dates that must be counted as non-working days. The list can be given in a cell range.

批注图标

将日期作为公式一部分输入时,日期分隔符 (斜杠与短横线) 会被理解为算术运算符。因此,按此格式输入的日期无法正确识别为日期,导致错误计算。要保持日期作为公式一部分,请使用 DATE 函数,例如「DATE(1954;7;20)」或将日期放在引号内,使用 ISO 8601 标记法,例如「1954-07-20」。请避免使用受区域影响的日期格式,例如「07/20/54」,在其他区域设置下加载文档,会导致计算错误。


提示图标

支持 ISO 8601 日期时间格式 (及其分隔符扩展格式) 的无歧义转换。如果出现 #VALUE! 错误,请在「 - LibreOffice Calc - 公式」「详细计算设置」区域的「详细信息...」 按钮,「文本转换为数字」列表框,取消选择「生成 #VALUE! 错误」。


示例

What date comes 20 workdays after December 13, 2016? Enter the start date in C3 and the number of workdays in D3.

The weekend parameter (number) may be left blank or defined as 1 for default weekend (non-working days) – Saturday and Sunday.

Cells F3 to J3 contain five (5) holidays for Christmas and New Year in date format: December 24, 2016; December 25, 2016; December 26, 2016; December 31, 2016; and January 1, 2017.

=WORKDAY.INTL(C3;D3;;F3:J3) returns January 11, 2017 in the result cell, say D6 (use date format for the cell).

To define Friday and Saturday as weekend days, use the weekend parameter 7.

=WORKDAY.INTL(C3;D3;7;F3:J3) returns January 15, 2017 with weekend parameter 7.

To define Sunday only the weekend day, use the weekend parameter 11.

=WORKDAY.INTL(C3;D3;11;F3:J3)」返回2017年1月9日。

Alternatively, use the weekend string "0000001" for Sunday only weekend.

=WORKDAY.INTL(C3;D3;"0000001";F3:J3)」返回2017年1月9日。

The function can be used without the two optional parameters – Weekday and Holidays – by leaving them out:

=WORKDAY.INTL(C3;D3) gives the result: January 10, 2017.