Module
Contents
Index 🔎︎

## WORKDAY

结果是可以格式化为日期的一个日期值。您可以看到开始日期以后的工作日天数。

### Syntax

WORKDAY(StartDate; Days; Holidays)

StartDate 开始计算的日期。如果开始日期是一个工作日，则这一天也要计算在内。

Days 工作日天数。开始日期后的结果为正值，开始日期前的为负值。

Holidays 选择性的假日列表。这些是不需要工作的日子。请输入一个单独执行假日的单元格区域。

When entering dates as part of formulas, slashes or dashes used as date separators are interpreted as arithmetic operators. Therefore, dates entered in this format are not recognized as dates and result in erroneous calculations. To keep dates from being interpreted as parts of formulas use the DATE function, for example, DATE(1954;7;20), or place the date in quotation marks and use the ISO 8601 notation, for example, "1954-07-20". Avoid using locale dependent date formats such as "07/20/54", the calculation may produce errors if the document is loaded under different locale settings.

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 - PreferencesTools - Options
- LibreOffice Calc - Formula, button Details... in section "Detailed Calculation Settings", Conversion from text to number list box.

### Example

2001 年 12 月 1 日后的第 17 个工作日是哪一天？在 C3 中输入开始日期 "2001-12-01"，在 D3 中输入工作日的天数。单元格 F3 到 J3 中则是圣诞节和新年的假期："2001-12-24"、"2001-12-25"、"2001-12-26"、"2001-12-31"、"2002-01-01"。

=WORKDAY(C3;D3;F3:J3) returns 2001-12-28. Format the serial date number as a date, for example in the format YYYY-MM-DD.

相关主题

NETWORKDAYS

NETWORKDAYS.INTL

WORKDAY.INTL

Date functions