+ Reply to Thread
Results 1 to 8 of 8

Calculate year month and days between two dates

  1. #1
    Registered User
    Join Date
    11-24-2008
    Location
    Delhi
    Posts
    39

    Question 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.
    Attached Files Attached Files
    This site work as

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,196

    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. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 for Mac OSX & Windows
    Posts
    6,884

    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
    Attached Files Attached Files
    Last edited by etaf; 04-24-2017 at 02:15 AM.
    Wayne

    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    11-24-2008
    Location
    Delhi
    Posts
    39

    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. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 for Mac OSX & Windows
    Posts
    6,884

    Re: Calculate year month and days between two dates

    what about
    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
    Last edited by etaf; 04-24-2017 at 02:45 AM.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,196

    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. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 for Mac OSX & Windows
    Posts
    6,884

    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. #8
    Registered User
    Join Date
    11-24-2008
    Location
    Delhi
    Posts
    39

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How do return days,week no,month and year in between two dates
    By silambarasan.J in forum Excel General
    Replies: 5
    Last Post: 10-26-2016, 04:29 AM
  2. Calculate how many days in a year that falls between two dates
    By shaunguyver in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-13-2016, 08:12 AM
  3. [SOLVED] How to calculate Year, Month and Day from total number of days?
    By Indra Rai in forum Excel General
    Replies: 4
    Last Post: 06-25-2014, 02:08 PM
  4. Replies: 15
    Last Post: 06-03-2014, 02:08 PM
  5. find time left in month.days unit between two dates(in YEAR.MONTH.DAY)
    By xcfeng95 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 02-21-2014, 12:55 PM
  6. Calculate Year Month and Days and Add them
    By lavan_joy in forum Excel General
    Replies: 8
    Last Post: 11-17-2010, 12:35 PM
  7. Drop days from dates to just month and year
    By mrrpv in forum Excel General
    Replies: 2
    Last Post: 02-01-2007, 12:49 PM

Bookmarks

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