Excel DATEDIF Function

This Excel Tutorial demonstrates how to use the Excel DATEDIF Function in Excel to count the number of days, months, or years between dates, with formula examples.

DATEDIF Function Description:

The DATEDIF Function Returns the number of days, months or years between two dates.

Formula Examples:

datedif function examples

ExampleFormulaResult
Years=DATEDIF(C5,D5,E5)4
Months=DATEDIF(C6,D6,E6)3
Days=DATEDIF(C7,D7,E7)135

Syntax and Arguments:

The Syntax for the DATEDIF Formula is:

Function Arguments ( Inputs ):

start_date – The start date in Excel serial number format. Example: You can not enter 11/12/2015 directly into the cell. Instead you would need to use the corresponding serial number: 42320. Alternatively, you can reference a cell with the date 11/12/2015 entered. Excel automatically converts dates stored in cells into serial format (unless the date is entered as text).

end_date – The end date in Excel serial number format. Example: You can not enter 11/12/2015 directly into the cell. Instead you would need to use the corresponding serial number: 42320. Alternatively, you can reference a cell with the date 11/12/2015 entered. Excel automatically converts dates stored in cells into serial format (unless the date is entered as text).

unit – The time unit to use. Enter “Y”

Additional Notes

Use the DATEDIF Function to calculate the number of days, months, or years between dates. First, Enter the two dates you want to find the difference of. Then enter the unit (“Y”,”M”,”D”,”MD”,”YM”,”YD” see above for key) you wish to return. The Start Date can actually be after the End Date, in which case the DATEDIF will be negative.

Return to the List of all Functions in Excel

How to use the DATEDIF Function in Excel:

To use the AND Excel Worksheet Function, type the following into a cell:
=AND(
After entering it in the cell, notice how the AND formula inputs appear below the cell:

You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=DATEDIF(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:

For more information about the DATEDIF Formula visit the
Microsoft Website.

ADS GO HERE

Posted in