YEARFRAC(start_date,end_date,basis)
start_date: starting date serial value
end_date: ending date serial value
basis: calendar basis
YEARFRAC calculates the number of days from start_date to end_date according to the calendar specified by basis, which defaults to 0, and expresses the result as a fractional number of years.
If basis is 0, then the US 30/360 method is used. If basis is 1, then actual number of days is used. If basis is 2, then actual number of days is used within a month, but years are considered only 360 days. If basis is 3, then actual number of days is used within a month, but years are always considered 365 days. If basis is 4, then the European 30/360 method is used.
DATE.