YEARFRAC
Description
Returns the number of days between two specified dates, shown as a fraction of the year.
Syntax
YEARFRAC(
start_date
,
end_date
, [
basis
])
- start_date: The start date.
- end_date: The end date.
- basis: The financial day count to use, shown here using x/y where x = days per month and y = days per year. 0 or Empty = US NASD 30/360; 1 = actual/actual; 2 = actual/360; 3 = actual/365; 4 = European 30/360.
Example
Formula | Result |
|---|---|
=YEARFRAC("8/14/2016 05:30 PM","12/31/2016") | 0.380555556 |
=YEARFRAC("8/14/2016","12/31/2016",1) | 0.379781421 |