Excelbaba

How to use Datedif function in excel or difference between two dates

If you want to difference between two dates like as Year, Month & Days. The syntax is given below.

Datedif( start_date, end_date, unit)

Unit
Explanation
Y
Gives us number of years between two dates
M
Gives us number of Months between two dates
D
Gives us number of Days between two dates
YD
Gives us difference between days (Years and dates are ignored)
YM
Gives us difference between months (Years and days are ignored)
MD
Gives us difference between Days (Years and Months are ignored)

1- When we use unit no. “Y” then results are given below…
2- When we use unit no. “M” then results are given below…















3- When we use unit no. “D” then results are given below…













4- When we use unit no. “YD” then results are given below…

















5- When we use unit no. “YM” then results are given below…










6- When we use unit no. “MD” then results are given below…














Excelbaba

About Excelbaba -

Author Description here.. Nulla sagittis convallis. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.

Subscribe to this Blog via Email :