DIATRABALHOTOTAL.INTL

Returns the number of workdays between a start date and an end date. 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.

Sintaxe

NETWORKDAYS.INTL(StartDate; EndDate [; [ Weekend ] [; Holidays ] ])

data_inicial corresponde à data a partir da qual o cálculo é efetuado. Se a data inicial for um dia de trabalho, o dia será incluído no cálculo.

data_final é a data até à qual o cálculo é executado. Se data_final for um dia de trabalho, o dia será incluído no cálculo.

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:

De 1 a 7 para fins de semana com dois dias e de 11 a 17 para fins de semana com um dia.

número

Weekend

1 ou omisso

sábado e domingo

2

domingo e segunda

3

segunda e terça

4

terça e quarta

5

quarta e quinta

6

quinta e sexta

7

sexta e sábado

11

apenas domingo

12

apenas segunda

13

apenas terça

14

apenas quarta

15

apenas quinta

16

apenas sexta

17

apenas sábado


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.

note

Ao introduzir datas como parte integrante de fórmulas, as barras ou traços utilizados como separadores serão interpretados como operadores aritméticos. Assim, as datas introduzidas nestes formatos não serão reconhecidas e irão originar cálculos errados. Se quiser utilizar datas como parte integrante de fórmulas, utilize a função DATA, por exemplo, DATA(1954;7;20) ou coloque a data entre aspas e utilize o formato ISO8601, por exemplo: "1954-07-20". Também não deve utilizar formatos de data consoante a sua configuração regional tais como "07/20/54", uma vez que o cálculo poderá originar erros se o documento for aberto com definições de configuração regional diferentes das suas.


tip

É possível uma conversão sem ambiguidades para datas e horas ISO 8601 nos seus formatos expandidos com separadores. Se ocorrer o erro #VALOR!, então desmarque a opção Gerar um erro #VALOR! em - LibreOffice Calc - Fórmula, botão Detalhes... da secção "Definições detalhadas para cálculos", na caixa de lista Conversão de textos em números.


note

This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


Exemplos

How many workdays fall between December 15, 2016 and January 14, 2017? Let the start date be located in C3 and the end date in D3. 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.

=NETWORKDAYS.INTL(C3;D3;;F3:J3) returns 21 workdays with default for weekend days.

=NETWORKDAYS.INTL(C3;D3;11;F3:J3) returns 24 workdays with Sunday only weekends.

Alternatively, use the weekend string “0000001” to define Sunday as the non-working day of every week.

=NETWORKDAYS.INTL(C3;D3;“0000001”;F3:J3) returns 24 workdays with Sunday only weekend.

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

=NETWORKDAYS.INTL(C3;D3) gives 22 working days.

Technical information

tip

Esta função está disponível desde o LibreOffice 4.3.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.NETWORKDAYS.INTL

Necessitamos da sua ajuda!