| Financial Toolbox | ![]() |
Syntax
Fraction = yearfrac(StartDate, EndDate, Basis)
Description
Fraction = yearfrac(StartDate, EndDate, Basis)
returns a fraction based on the number of days between dates StartDate and EndDate using the given day-count basis. If EndDate is earlier than StartDate, YearFraction is negative.
Examples
Fraction = yearfrac('14 mar 01', '14 sep 01', 0)
Fraction =
0.5041
Fraction = yearfrac('14 mar 01', '14 sep 01', 1)
Fraction =
0.5000
See Also
days360, days365, daysact, daysdif, months, wrkdydif, yeardays
| yeardays | ylddisc | ![]() |