YEARFRAC
The YEARFRAC function returns the fraction of a year represented by the number of whole days between two dates.
YEARFRAC(start-date, end-date, days-basis)
start-date: The starting date. start-date is a date/time value (the time portion is ignored) or date string.
end-date: The ending date. end-date is a date/time value (the time portion is ignored) or date string.
days-basis: An optional modal value specifying the number of days per month and days per year used in the calculations.
30/360 (0 or omitted): 30 days in a month, 360 days in a year, using the NASD method.
actual/actual (1): Actual days in each month, actual days in each year.
actual/360 (2): Actual days in each month, 360 days in a year.
actual/365 (3): Actual days in each month, 365 days in a year.
30E/360 (4): 30 days in a month, 360 days in a year, using the European method.
Examples |
---|
=YEARFRAC("12/15/2009", "6/30/2010", 0) returns approximately 0.541666666666667, using the 30/360 days basis. =YEARFRAC("12/15/2009", "6/30/2010", 1) returns approximately 0.53972602739726, using the actual days basis. =YEARFRAC("12/15/2009", "6/30/2010", 2) returns approximately 0.547222222222222, using the actual/360 days basis. =YEARFRAC("12/15/2009", "6/30/2010", 3) returns approximately 0.53972602739726, using the actual/365 days basis. =YEARFRAC("12/15/2009", "6/30/2010", 4) returns approximately 0.541666666666667, using the 30/360 European days basis. |