+ Reply to Thread
Results 1 to 5 of 5

Date & Time difference

  1. #1
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Date & Time difference

    Hi all,

    I am looking at a formula to show the difference in time (HH:MM:SS) between two times and dates.

    In Column B I have the date in the following format dd.mm.yy

    In Column C I have the start time in the following format hh:mm:ss

    In Column P I have the end time in the following format hh:mm:ss


    Ultimately I am looking at the difference between the end time in the 1st row and the start time in the next row, but the formula I used (=B2+P2-B3-C3) shows ####### in some of the cells.

    Any ideas please?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Date & Time difference

    Your formula looks OK. Is your date a true Excel date formatted as dd.mm.yy or is it a text value?

    When you get a ##### result it is because you have caculated a negatve date/time. Excel does not believe in negative date/times. Check your data to see if that is the case.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  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 & Time difference

    please post an example file. Most likely you are getting negative outcome. but when dates are included that should not happen. Are you sure that the endtimes are on row two and the begin time is on row 3?

    otherwise I suggest using (=B3+P3-B2-C2) that seems to make more sense to me. But to be sure and to get better help attach an example file.. see yellowbanner at the top for instructions how to..

  4. #4
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    756

    Re: Date & Time difference

    Yes, its an issue with negative times. I can display it if I change excel to 1904 formula, but then that causes an issue with my dates.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Date & Time difference

    One workaround is

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

+ 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. Calculate time difference between Date/Time fields
    By mattfleet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2019, 06:43 PM
  2. Replies: 4
    Last Post: 06-04-2017, 07:34 AM
  3. Time difference between two Date Time fields.
    By sajit4134 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-19-2014, 03:21 AM
  4. Calculation of time difference between the Start date & time & End Date & time
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-17-2012, 03:54 PM
  5. [SOLVED] Caculating the Time difference from Start & end date/time excludin weekends & non ofce hrs
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-08-2012, 06:25 AM
  6. [SOLVED] Subtract date/time from data/time and get difference in minutes
    By zit1343 in forum Excel General
    Replies: 2
    Last Post: 06-18-2012, 11:23 AM
  7. Time Difference in hours between two date time stamps
    By Cipher in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2010, 10:24 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