+ Reply to Thread
Results 1 to 4 of 4

Difference between dates as "x years, y months, z days"

  1. #1
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123

    Difference between dates as "x years, y months, z days"

    Hi

    I am tyring to show the difference between 2 dates as text using the formula below:

    Start Date End Date
    01/01/2007 31/12/2008
    =DATEDIF(A$2,B$2,"y")&" years, "&(DATEDIF(A$2,B$2,"ym")&" months, "&(DATEDIF(A$2,B$2,"md")+1)&" days.")

    but I am getting the result:

    1 years, 11 months, 31 days.

    How can i get the result to say 2 years, 0 months, 0 days?

    Thank you

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Your need to change your end date to 01/01/2009, it works out the difference between dates

    If you can't change your end date for some reason, you could use

    =DATEDIF(A$2,B$2+1,"y")&" years, "&(DATEDIF(A$2,B$2+1,"ym")&" months, "&(DATEDIF(A$2,B$2+1,"md")&" days."))
    Last edited by oldchippy; 11-21-2007 at 07:29 AM.
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Contributor
    Join Date
    11-06-2007
    Posts
    123
    Thanx for your help

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to help - thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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