DATEDIF Function

Basic Description

Calculates the number of days, months, or years between two dates.

Syntax: DATEDIF(start_date,end_date,unit)

Where the arguments are as follows:
Start_date – A date that represents the first, or starting, date of the period.
End_date – A date that represents the last, or ending, date of the period.
Unit – The type of information that you want returned:

Unit Returns
“Y” The number of complete years in the period.
“M” The number of complete months in the period.
“D” The number of days in the period.
“MD” The difference between the days in start_date and end_date. The months and years of the dates are ignored.
“YM” The difference between the months in start_date and end_date. The days and years of the dates are ignored
“YD” The difference between the days of start_date and end_date. The years of the dates are ignored.

Remarks

Dates are stored as sequential serial numbers so they can be used in calculations. The DATEDIF function is useful in formulas where you need to calculate an age.

 

DATEDIF Function Example

The following spreadsheets show examples of the Datedif function. The formulas are shown in the spreadsheet on the above, and the results are shown in the spreadsheet on the below.

Formulas:

datedif_formula-2

Results:

datedif_result

 

Download Documents

Download Excel File

4 thoughts on “DATEDIF Function

  1. Khandaker Sayem Mahmud

    Excellent. Helped me a lot. Mr. monower is an highly experienced excel trainer. I wish him success in future.

  2. Abu Baker Shibly

    Excellent. It helped me a lot.

  3. mohammad mehdi hasan

    It is very much supportive

  4. Anonymous

    Too gud…pls keep this continuing!!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

code

clearPost Comment