| Financial Toolbox | ![]() |
Syntax
NumDays = daysdif(StartDate,EndDate, Basis)
Any input argument can contain multiple values, but if so, the 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 EndDate must be an n-row character array of date strings or a single date. NumDays is then an n-by-1 vector of numbers.
Description
NumDays = daysdif(
returns the number of days between dates StartDate, EndDate, Basis)
StartDate and EndDate using the given day-count basis. Enter dates as serial date numbers or date strings.
if statements.
Examples
NumDays= daysdif('3/1/99', '3/1/00', 1)NumDays=360MoreDays = ['3/1/2001'; '3/1/2002'; '3/1/2003'];NumDays= daysdif('3/1/98', MoreDays)NumDays=109614611826
See Also
datenum, days360, days365, daysact, wrkdydif, yearfrac
| daysact | depfixdb | ![]() |