How can we help?
Returns the number of years, including fractional years, between two dates using a specified day count convention.
YEARFRAC(start_date, end_date, [day_count_convention])
start_date- The start date to consider in the calculation. Must be a reference to a cell containing a date, a function returning a date type, or a number.
end_date- The end date to consider in the calculation. Must be a reference to a cell containing a date, a function returning a date type, or a number.
day_count_convention- [ OPTIONAL -
0by default ] - An indicator of what day count method to use.
0, this calculates based on a 30 day month and 360 day year, but adjusts end-of-month dates according to European financial conventions.
1, Actual/Actual, is most likely the correct choice.
TO_DATE, or date serial numbers of the type returned by the
YEARFRACdoes not autoconvert number formats. Therefore,
YEARFRAC(10/10/2000,10/10/2001)is interpreted as
YEARFRAC(0.005,0.00499750124938), the quotients of 10 divided by 10 divided by 2000 and 2001, respectively.
TO_DATE: Converts a provided number to a date.
N: Returns the argument provided as a number.
DAYS360: Returns the difference between two days based on the 360 day year used in some financial interest calculations.
DATEVALUE: Converts a provided date string in a known format to a date value.
DATE: Converts a provided year, month, and day into a date.