+ Reply to Thread
Results 1 to 7 of 7

Difference between two Dates (DATEIF)

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Difference between two Dates (DATEIF)

    Hi Everyone,
    My name is Asmath and i work in IT firm wherein I involve in lot of reporting stuff.


    Scenario:
    I have two random dates in cell D39 and D40 and I have used DATEIF formula in cell F39 and F40 which calculates the difference between the dates in D39/40 cell with current date in “Years Month Days” format

    Now I would like to have a difference between two dates i.e; F39 and F40 cells in the same format as “Years Month Days” in G39 cell

    D39 = 5/10/2010
    D40 = 8/8/2011
    F39 = =DATEDIF(D39,TODAY(),"Y") & " Years, " & DATEDIF(D39,TODAY(),"YM") & " Months, " & DATEDIF(D39,TODAY(),"MD") & " Days"
    F40 = =DATEDIF(D40,TODAY(),"Y") & " Years, " & DATEDIF(D40,TODAY(),"YM") & " Months, " & DATEDIF(D40,TODAY(),"MD") & " Days"


    Thanks in advance for you help!!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Difference between two Dates (DATEIF)

    Hi alpha32,

    welcome to the forum.

    Dates in D39 are in which format.. dd/mm/yyyy or mm/dd/yyyy?
    Also, share you expected result for F39 and F40.. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Difference between two Dates (DATEIF)

    See this link
    The DATEDIF Worksheet Function - Chip Pearson
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    10-22-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Difference between two Dates (DATEIF)

    Hi DILIPandey and Marcol

    Thanks for responding my question.
    the D39 cells are in dd/mm/yyyy format

    and Marcol
    http://www.cpearson.com/excel/datedif.aspx

    I gone through this link, i am current using the same formula which the link has mentioned (DATEIF) formula.
    But i am looking for looking for difference between two cells where i used DATEIF formula.

    As mentioned in the begining of this tread i need difference between F39 and F40

    Thanks in advance.

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Difference between two Dates (DATEIF)

    Also, share you expected result for F39 and F40.. thanks.
    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Difference between two Dates (DATEIF)

    The difference between F39 and F40, is the same as the difference between D39 and D40.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-22-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Difference between two Dates (DATEIF)

    Thanks a lot Marcol,
    It is working for D39 and D40,

    Can you please help me in finding difference between F39 and F40 with the same format,

    F39 = =DATEDIF(D39,TODAY(),"Y") & " Years, " & DATEDIF(D39,TODAY(),"YM") & " Months, " & DATEDIF(D39,TODAY(),"MD") & " Days"
    F40 = =DATEDIF(D40,TODAY(),"Y") & " Years, " & DATEDIF(D40,TODAY(),"YM") & " Months, " & DATEDIF(D40,TODAY(),"MD") & " Days

    the display is as below
    F39 = 4 Years, 0 Months, 28 Days
    F40 = 30 Years, 6 Months, 6 Days

    Without using D39,D40 in the formula i need to find difference between F39,F40.
    (some cases i will use TODAY() formula in F:F)
    Last edited by alpha32; 11-11-2012 at 04:08 AM.

+ 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