Documentation

wrkdydif

Number of working days between dates

Syntax

Days = wrkdydif(StartDate, EndDate, Holidays)

Arguments

StartDate

Enter as serial date numbers, date character vectors, or datetime arrays.

EndDate

Enter as serial date numbers, date character vectors, or datetime arrays.

Holidays

A vector containing values for the number of Holidays between the two dates.

Description

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. Enter dates as serial date numbers, date character vectors, or datetime arrays.

Examples

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

or

Days = wrkdydif(730730, 730740, 1)

or

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

returns

Days =
       6

Related Examples

Introduced before R2006a

Was this topic helpful?