Forum Discussion

Ahmed Al Ameri's avatar
Ahmed Al Ameri
Copper Contributor
Mar 11, 2017

Calculating Duration

Hello,
I would like to know which formula I can use in days calculation between two dates (Counting the first date).
For example:
I have a course starting on 1/4/2017 and ending on 5/4/2017 so the direct calculation shows the different is 4 days, but the real processing duration is 5 days. So I want to know the formula in Excel 2016 then I apply it for all the courses I have to get the duration.

 

Thank you for your help

 

Ahmed Al Ameri

  • Hi Ahmed

     

    If your have date values stored in your cells then, End_Date - Start_Date +1 gives you the duration in days.  As far as i recall, there are know special functions for this, just using regular subtraction and addition on date values.

  • Roger Smith's avatar
    Roger Smith
    Copper Contributor

    I feel your pain!  When I use simple math and subtract two dates that are equal i.e. End_Date=Start_Date the result is 1mo. difference.  

    1925/06/30 - 1925/06/30 = 1mo.  - wrong!  I need a function, formula, format solution.

     

    Thanks for your post.

    • SergeiBaklan's avatar
      SergeiBaklan
      MVP

      Roger, in Excel dates are sequential integers. For example, May 21, 2018 is equal to 43241. Next day, May 22, will be 43242. Just try to apply General format to the cell with your date. All the rest is how do you represent (format) dates and it depends on your regional settings and formats you use within Excel.

       

      Thus This date minus This date is always zero.

       

      However, more advanced way to calculate dates difference, not only in dates, is DATEDIF

      https://support.office.com/en-us/article/datedif-function-25dba1a4-2812-480b-84dd-8b32a451b35c

Resources