Explainry Tutorials to Expert in IT

DATEDIF function in Google Sheets

The DATEDIF function provides number of days, months or years between two dates. In this lesson, we will learn how to use the DATEDIF function in Google Sheets.

Syntax

DATEDIF(start_date, end_date, unit)

start_date – Required. The start date to be use in the calculation.

end_date – Required. The end date to be use in the calculation.

unit – Required. A text abbreviation for unit of time. For example, “D” for days. Available options are:

  1. “Y”: the number of whole years between start_date and end_date.
  2. “M”: the number of whole months between start_date and end_date.
  3. “D”: the number of days between start_date and end_date.
  4. “MD”: After subtracting whole months, the number of days between start_date and end_date.
  5. “YM”: After subtracting whole years, the number of whole months between start_date and end_date.
  6. “YD”: the number of days between start_date and end_date, assuming start_date and end_date not more than one year apart.

Example

In this example, we will calculate how many number of days have passed since Mr. A birthday.

Formula:

For more detail, visit Google official website.




Copyright © 2016 - 2020 Explainry.com | All Rights Reserved