# 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.

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"))

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

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.

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

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")

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 ?

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 :-)

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1