+ Reply to Thread
Results 1 to 7 of 7

Time differences between two dates

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Canada
    MS-Off Ver
    ms365
    Posts
    79

    Time differences between two dates

    Hello All,

    I have an excel sheet with 4 columns: Start date, Start Time, End Date, End Time. I would like to know the time duration between these two dates in the fifth column. I am able to use the Mod function =MOD(D4-B4,1) to get the time duration between the times but don't know how to incorperate the date cells in it Because some trial experiment can go on for more than a day. Please have look at the sample excell sheet attached. Any help would be appreciated. Thnx
    Attached Files Attached Files

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Time differences between two dates

    Try this formula in E2 and copy down;
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And format your cells as [h]:mm

  3. #3
    Registered User
    Join Date
    03-26-2013
    Location
    Canada
    MS-Off Ver
    ms365
    Posts
    79

    Re: Time differences between two dates

    #VALUE! error. see image for details please (I did format the cells to [h]:mm).
    Attached Images Attached Images

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Time differences between two dates

    It's because your dates are stored as text. Works for me though Excel 2013?

    Type in your dates again to test.

  5. #5
    Registered User
    Join Date
    03-26-2013
    Location
    Canada
    MS-Off Ver
    ms365
    Posts
    79

    Re: Time differences between two dates

    excel 2010. The dates are stored as 'General', what format should they be. I tried switching to Date format, same results.

  6. #6
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Time differences between two dates

    Try changing your dates to numbers. Many ways to do this but just retype them in (not the format).

    See how the dates are left justified, that's because they are text. Once they are a number they will be right-justified.

    Don't know why the formula works for me but not you.

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Time differences between two dates

    Hi.
    Try the attached.
    The entries are in 'text'.
    The hh:mm are 'text' and 24 hour format.
    There are two hidden helper columns "E" & "H".
    They contain CONCATENATE formulas.
    Open them up temporarily by bridging "D to I" and set column width 10.
    May be 'a hammer to crack a walnut' but it works.
    torachan.
    Attached Files Attached Files
    Last edited by torachan; 01-29-2019 at 05:05 AM. Reason: confused columns & rows

+ 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. [SOLVED] Calculating time differences in 24 hour time when going past midnight
    By Thug in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-29-2018, 10:22 AM
  2. [SOLVED] Differences between two dates
    By Image in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-11-2014, 06:03 PM
  3. [SOLVED] Dates and time differences with blank cells and monthly totals....
    By claudiamariep in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2014, 01:16 PM
  4. Time differences without dates?
    By beansbeansbeans in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-27-2011, 02:08 PM
  5. Calculating time differences over different dates
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2010, 01:26 PM
  6. Replies: 1
    Last Post: 05-11-2006, 05:22 AM
  7. calculating time/dates differences
    By fvglassman in forum Excel General
    Replies: 3
    Last Post: 06-22-2005, 07:05 PM

Tags for this Thread

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