Google Sheets YEARFRAC Function | Get Number of Years Between Two Dates | Google Sheets Formulas

preview_player
Показать описание
Use the Google Sheets YEARFRAC function to find the exact number of years, including fractional years, between two dates. The YEARFRAC function uses either the default day count convention, which is one, or uses that specified by the user.

===========================================
If you wish to know how to use DATEDIF, here is the link
to the two, step-by-step video tutorials:

How to use TODAY and DATEDIF in Google Sheets?

Use DATEDIF and Calculate Age in Years, Months, and Days in Google Sheets

===========================================

Here's the format of the YEARFRAC function formula:

=YEARFRAC(start_date, end_date, [day_count_convention])

Start the formula with an equal-to symbol.

YEARFRAC is the name of the function.

start_date is the first date of the date range.

end_date is the last date of the date range.

day_count_convention is optional, and indicates the day count method the function will use. The values for this attribute range from 0-4.

The value of 0 means 30 days in each month and 365 days in each year.
The value of 1 means actual days between the specified dates and in the intervening years.
The value of 2 means actual days between the specified dates and 360-day year.
The value of 3 means actual days between the specified dates and 365-day year.
The value of 4 means 30 days in each month and 365 days in each year. End-of-month dates are adjusted as per European financial standards.

Let's look at an example of the YEARFRAC function:

=YEARFRAC("05/03/2021", "07/12/2030", 1)

The function returns 9.191780822, which is the number of years between the two dates.

Take a look at this video tutorial, which gives the steps to use the Google Sheets YEARFRAC function with an example.
Рекомендации по теме