+ Reply to Thread
Results 1 to 4 of 4

Calculate month difference between two dates

  1. #1
    Registered User
    Join Date
    06-10-2008
    Posts
    2

    Calculate month difference between two dates

    Hello,

    I am trying to calculate the difference between two dates of different years and get the result in months..

    i am using the following formula :

    =(YEAR(LDate)-YEAR(EDate))*12+MONTH(LDate)-MONTH(EDate)

    but the result i get is this :

    10/2/1900 0:00

    the result i need is in months! Hope will I do that? Anyone know?

    I will really appreciate the help.. thanks..

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Format the cell to number...
    Right click..select format cell.... format it to number...

  3. #3
    Registered User
    Join Date
    06-10-2008
    Posts
    2
    Thanks mate...

    I am wondering why didn't i think about it...

    it worked just fine..

    thanks again.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could also get the same result with this formula

    =DATEDIF(EDate-DAY(EDate)+1,LDate,"M")

+ 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