Calculate year month and days between two dates

1. Calculate year month and days between two dates

Hi Guys, I need Year, Months and Days between two dates so please help with some formula. Sample attached.  Register To Reply

2. Re: Calculate year month and days between two dates

Years: =DATEDIF(B2,B3,"Y")

Months: =DATEDIF(B2,B3,"YM")

Days: =DATEDIF(B2,B3,"MD")

Or Days: =B3-EDATE(B2,DATEDIF(B2,B3,"M"))  Register To Reply

3. Re: Calculate year month and days between two dates

=DATEDIF(C2,C3,"y")
years,

=DATEDIF(C2,C3,"ym")
months,

DATEDIF(C2,C3,"md")
days"

Although Days is not 5 - unless you are counting these differently to months and years

https://exceljet.net/formula/get-day...-between-dates  Register To Reply

4. Re: Calculate year month and days between two dates

Thanks :-) but when we assume start date as "1st Mar 2014" and end date as "31st Mar 17" then result are coming as 3 Years + 0 Months + 30 Days.
where i am expecting result = 3 Years + 1 Months + 0 Days.  Register To Reply

5. Re: Calculate year month and days between two dates

1st April 14 to 31st March 17 - is that 3 or 2 years ?

Or
01-Apr-14 to 31-Mar-21 is that 6 or 7 years

Or
02-Apr-14 to 01-Apr-17 ? years  Register To Reply

6. Re: Calculate year month and days between two dates

Years: =DATEDIF(B2,B3+1,"Y")

Months: =DATEDIF(B2,B3+1,"YM")

Days: =DATEDIF(B2,B3+1,"MD")  Register To Reply

7. Re: Calculate year month and days between two dates

that will report
02-Apr-14
to
01-Apr-17
as 3 years , hence the question on years ?  Register To Reply

8. Re: Calculate year month and days between two dates

Thanks Phuocam,

This worked perfectly fine in all combinations

Years: =DATEDIF(B2,B3+1,"Y")

Months: =DATEDIF(B2,B3+1,"YM")

Days: =DATEDIF(B2,B3+1,"MD")

Thanks a lot :-)  Register To Reply