+ Reply to Thread
Results 1 to 4 of 4

Date difference formula

  1. #1
    Registered User
    Join Date
    07-30-2018
    Location
    Dar es Salaam, Tanzania
    MS-Off Ver
    2016
    Posts
    2

    Date difference formula

    Date difference formula between two dates. The results should be in the number of years, months (remaining from the previous full year), and days (remaining from the previous full month).
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Date difference formula

    Welcome to Excel Forum!

    Try this formula in D3, this is for all versions of excel.

    =DATEDIF([@[Latest Started IPT]],[@[Completed IPT in Jan 19]],"Y")&" Years, "&DATEDIF([@[Latest Started IPT]],[@[Completed IPT in Jan 19]],"YM")&" Months, "&DATEDIF([@[Latest Started IPT]],[@[Completed IPT in Jan 19]],"MD")&" Days"

    For excel 2019 or office 365 subscriptions, you can use a shorter formula to get the same results.

    =TEXTJOIN(", ",1,DATEDIF([@[Latest Started IPT]],[@[Completed IPT in Jan 19]],{"Y","Ym","md"})&{" Years"," Months"," Days"})

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Date difference formula

    Hi and welcome

    that will take a combination of several Datediff functions
    I added some example columns and then the a column with the combined formulas to get the result you look for.
    also have a look at this link for the working of used codes YM and YD and MD
    https://support.office.com/en-us/art...d-8b32a451b35c

    the final formula combined y, m and days looks like this

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

  4. #4
    Registered User
    Join Date
    07-30-2018
    Location
    Dar es Salaam, Tanzania
    MS-Off Ver
    2016
    Posts
    2

    Re: Date difference formula

    Thanks Jason and Roel, appreciated the solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 07-18-2018, 12:30 PM
  2. Formula to Calculate date difference between random workdays
    By maranoqu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-05-2018, 08:24 AM
  3. Need assistance creating a formula to show the difference between two date/time
    By livebythecoad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-15-2014, 11:20 PM
  4. [SOLVED] Formula for working out top X of a date time difference
    By amasson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-25-2014, 04:04 AM
  5. [SOLVED] Repeating a date difference formula to groups of varying size.
    By cput in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-23-2012, 08:38 PM
  6. Formula to count date difference based on a criteria
    By athey87 in forum Excel General
    Replies: 3
    Last Post: 03-09-2012, 05:11 PM
  7. Date Difference Formula
    By henrythompson in forum Excel General
    Replies: 3
    Last Post: 09-13-2007, 04:56 AM

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