How to use the Excel DATEDIF function

Processing and calculating data with data is time (type date) very difficult because you can not use normal calculations. But the DATEDIF () function will help you do this, the function will help you calculate the data of the format of time in Excel.

Syntax: =DATEDIF (start_date, end_date, unit)

The DATEIF function syntax has the following arguments:

  • Start_date – This is a required argument. As the name suggests, it is the initial date of the period.
  • End_date – This is also a required argument. It represents the last, or ending, date of the period.
  • Unit – The time unit in which we want the information.

Note:

Interval Explanation
Y The number of complete years.
M The number of complete months.
D The number of days.
MD The difference between the days (months and years are ignored).
YM The difference between the months (days and years are ignored).
YD The difference between the days (years and dates are ignored).

Example: Let’s look at some Excel DATEDIF function examples and explore how to use the DATEDIF function as a worksheet function in Microsoft Excel:

dateif - How to use the Excel DATEDIF function

1. Syntax:  =DATEDIF(B21,C21,”d“)

Result:

dateif 1 - How to use the Excel DATEDIF function

2. Syntax:  =DATEDIF(B21,C21,”m“)

Result:

dateif 2 - How to use the Excel DATEDIF function

3. Syntax:  =DATEDIF(B21,C21,”y“)

Result:

dateif 3 - How to use the Excel DATEDIF function

4. Syntax:  =DATEDIF(B21,C21,”md“)

Result:

dateif 4 - How to use the Excel DATEDIF function

5. Syntax:  =DATEDIF(B21,C21,”YM“)

Result:

dateif 5 - How to use the Excel DATEDIF function

6. Syntax:  =DATEDIF(B21,C21,”YD“)

Result:

dateif 7 - How to use the Excel DATEDIF function

READ:  How to use the Excel AND function

Add a Comment

Your email address will not be published. Required fields are marked *