| Financial Toolbox™ | ![]() |
Days between dates based on 360-day year
NumDays = days360(StartDate, EndDate)
StartDate | Enter as serial date numbers or date strings. |
EndDate | Enter as serial date numbers or date strings. |
Either input can contain multiple values, but if so, the other 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-by-1 vector of integers or a single integer. NumDays is then an n-by-1 vector of date numbers.
NumDays = days360(StartDate, EndDate) returns the number of days between StartDate and EndDate based on a 360-day year (that is, all months contain 30 days). If EndDate is earlier than StartDate, NumDays is negative.
NumDays = days360('15-jan-2000', '15-mar-2000')
NumDays =
60
MoreDays = ['15-mar-2000'; '15-apr-2000'; '15-jun-2000'];
NumDays = days360('15-jan-2000', MoreDays)
NumDays =
60
90
150
Addendum to Securities Industry Association, Standard Securities Calculation Methods: Fixed Income Securities Formulas for Analytic Measures, Vol. 2, Spring 1995.
days365, daysact, daysdif, wrkdydif, yearfrac
![]() | day | days360e | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |