+ Reply to Thread
Results 1 to 4 of 4

Assistance with =DateDif function

  1. #1
    Registered User
    Join Date
    12-05-2006
    Posts
    29

    Assistance with =DateDif function

    I am hoping someone can help me here, Im not sure if its an issue with 2012 being a leap year.

    A1 cell contains a date of birth (eg 29/12/1983)
    B1 cell contains the date 1/1/2012

    I want to find the years and days between the two dates

    =DATEDIF(A1,B1,"Y") gives me the correct answer of 28

    however

    =DATEDIF(A1,B1,"YD") gives me 116 when I would have thought it should be 2.

    Am I on the wrong track here......is someone able to point me in the right direction?...............Thanks.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Assistance with =DateDif function

    Hi

    Try this. A1=day of birth>A2=the date that you want(01/01/2012)

    =DATEDIF(A1;A2;"y") & " Years " & DATEDIF(A1;A2;"ym") & " Months, " & DATEDIF(A1;A2;"md") & " Days"

    Change the semi-colons to gomma, if you have to do.

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    12-05-2006
    Posts
    29

    Re: Assistance with =DateDif function

    Thanks but that returns: 21 Years 0 Months, 114 Days

    I would have thought the difference is 21 Years 0 Months, 1 Day?

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Assistance with =DateDif function

    ??

    Take a look to the example...
    Attached Files Attached Files

+ 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