YEARFRAC |
YEARFRAC(start_date, end_date [,basis]) |
Returns the number of years as a decimal between two dates. |
start_date | The starting date. |
end_date | The finishing date. |
basis | (Optional) The type of day counting to use: 0 = 30/360 (default) 1 = Actual/Actual 2 = Actual/360 3 = Actual/365 4 = 30E/360 |
REMARKS |
* All arguments are truncated to integers. * Dates may be entered as text strings within quotation marks, as serial numbers or as results of other formulas or functions. * If "start_date" or "end_date" are not valid dates, then #NUM! is returned. * If "start_date" can be a text string or a date serial number. * If "basis" is left blank, then 0 is used. * If "basis" is not an integer, it is truncated. * If "basis" < 0, then #NUM! is returned. * If "basis" > 4, then #NUM! is returned. * If "basis" = 0, the calculation is based on 30 days in every month, divided by 360. * If "basis" = 1 (Actual/Actual), the calculation is based on the actual number of days in the month, divided by the actual number of days in the year. * If "basis" = 2 (Actual/360), the calculation is based on the actual number of days in the month, divided by 360. * If "basis" = 3 (Actual/365), the calculation is based on the actual number of days in the month, divided by 365. * If "basis" = 4 (European 30/360), the calculation is based on 30 days in a month, divided by 360. * You can use the DAYS360 function to return the number of days between two dates, based on 30 day months. * You can use the YEAR function to return the year as an integer given a date serial number. * For the Microsoft documentation refer to support.microsoft.com * For the Google documentation refer to support.google.com |
|
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top