# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

# wrkdydif

Number of working days between dates

## Syntax

• ``Days = wrkdydif(StartDate,EndDate,Holidays)``
example

## Description

example

````Days = wrkdydif(StartDate,EndDate,Holidays)` returns the number of working days between dates `StartDate` and `EndDate` inclusive. `Holidays` is the number of holidays between the given dates, an integer. ```

## Examples

collapse all

Determine `Days` using date character vectors for `StartDate` and `EndDate`.

```Days = wrkdydif('9/1/2000', '9/11/2000', 1) ```
```Days = 6 ```

Determine `Days` using serial date numbers for `StartDate` and `EndDate`.

```Days = wrkdydif(730730, 730740, 1) ```
```Days = 6 ```

Determine `Days` using a datetime array for `EndDate`.

```Days = wrkdydif('9/1/2000', datetime('11-Sep-2000','Locale','en_US'), 1) ```
```Days = 6 ```

## Input Arguments

collapse all

Start date, specified as an `N`-by-`1` or `1`-by-`N` vector using serial date numbers, date character vectors, or datetime arrays.

Data Types: `double` | `char` | `datetime`

End date, specified as an `N`-by-`1` or `1`-by-`N` vector using serial date numbers, date character vectors, or datetime arrays.

Data Types: `double` | `char` | `datetime`

Holidays between the `StartDate` and `EndDate`, specified as an `N`-by-`1` or `1`-by-`N` vector of integers.

Data Types: `single` | `double`

## Output Arguments

collapse all

Number of working days between dates `StartDate` and `EndDate` inclusive, returned an `N`-by-`1` or `1`-by-`N` vector of integers.

## See Also

#### Introduced before R2006a

Was this topic helpful?

#### Modelling and Analysis: A Financial Services Perspective

Download the industry report