| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Financial Toolbox |
| Contents | Index |
| Learn more about Financial Toolbox |
EndDate = datewrkdy(StartDate, NumberWorkDays, NumberHolidays)
StartDate | Start date vector. Enter as serial date numbers or date strings. |
NumberWorkDays | Vector containing number of work or business days in future (positive) or past (negative), including the starting date. |
NumberHolidays | Vector containing values for the number of holidays within NumberWorkDays. NumberHolidays and NumberWorkDays must have the same sign. |
Any input can contain multiple values, but if so, all other inputs must contain the same number of values or a single value that applies to all. For example, if StartDate is an n-row character array of date strings, then NumberWorkDays must be an n-by-1 vector of integers or a single integer. EndDate is then an n-by-1 vector of date numbers.
EndDate = datewrkdy(StartDate, NumberWorkDays, NumberHolidays) returns the serial number of the date a given number of workdays before or after the start date.
Use datestr to convert serial date numbers to formatted date strings.
Workday = datewrkdy('12-dec-2000', 16, 2);
datestr(Workday)
ans =
04-Jan-2001
NumDays = [16; 20; 44];
Workdays = datewrkdy('12-dec-2000', NumDays, 2);
datestr(Workdays)
ans =
4-Jan-2001
10-Jan-2001
13-Feb-2001
busdate, holidays, isbusday, wrkdydif
![]() | datevec | day | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |