Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Display difference of two days as year, month and days (https://www.askmehelpdesk.com/showthread.php?t=427196)

  • Dec 22, 2009, 12:21 AM
    shazydotcom
    Display difference of two days as year, month and days
    My question is that if it is possible that we can display the difference of two dates as Years, Months and days. For example

    A B C
    1 6/23/2002 11/30/2009 7 year 5 month 11 days

    The actual difference between dates in B1 and A1 is 7 Years, 5 Months and 11 days. Normally we see that we can calculate difference in terms of years, or months or days. But I don't know if excel provides a function which can display the result as completely as I showed in C1.

    If anyone knows, please help.

    Thanks in advance.
  • Dec 22, 2009, 04:32 AM
    ROLCAM

    This is the closest I can get it :-


    A B C
    1 6/23/2002 11/30/2009 7 year 5 month 11 days

    B A C
    9,11,30 2,06,23 7,5,7

    ##################################################

    MY AGE TO-DAY
    B A C
    2009,12,22 1930,10,02 79,2,20
    ##################################################

    What I am saying is that you do not need anything special to get this.
    Express the date in YEAR, MONTH and DAYS and then subtract on sight.
    I believe this would be accurate enough.
  • Dec 22, 2009, 10:02 AM
    JBeaucaire

    Try this in C1:

    =DATEDIF(A1,B1,"y") & " years, " & DATEDIF(A1,B1,"ym") & " months, "&((B1-A1)-(DATEDIF(A1,B1,"y")*365))-((DATEDIF(A1,B1,"ym"))*30) & " days"

    Code:

    6/23/2002        11/30/2009        7 years, 5 months, 12 days
    1/1/2007        7/15/2009        2 years, 6 months, 16 days


  • All times are GMT -7. The time now is 07:17 PM.