+ Reply to Thread
Results 1 to 3 of 3

Calulating Time Difference from separate Date and Time fields

  1. #1
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Calulating Time Difference from separate Date and Time fields

    Hi,
    I have two sets of date and time columns and need to calculate the time difference between them. My attempts are resulting in erroneous answers. Please see the attached file and help me with the value in cell L3 (shaded yellow)

    Thanks.

    B. Srivatsa
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Calulating Time Difference from separate Date and Time fields

    First, the formula for your "concatenated" cells (H3, K3) should be (H3 for example):

    =F3 + G3

    formatted as you wish. In my case: Custom m/d/yyyy h:mm .

    Note that F3 and G3 are numeric, not text.

    Second, without relying on H3 and K3, the time difference in L3 can be:

    =F3-I3 + G3-J3

    formatted as Custom [h]:mm . The squared bracketed [h] displays hours greater than 23.

    Caveat: With that format, the time difference must not be negative.

    PS.... If you want decimal hours in L3, the formula would be =(F3-I3 + G3-J3)*24 formatted as General or Number. In that case, the time difference can be negative.
    Last edited by curiouscat408; 05-02-2022 at 07:53 PM. Reason: minor improvements

  3. #3
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Atlanta, Georgia
    MS-Off Ver
    Office 365
    Posts
    104

    Re: Calulating Time Difference from separate Date and Time fields

    Thank you for the quick 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. 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. [SOLVED] Split combined date and time data into separate fields
    By Halfcent in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2016, 05:27 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. Sorting by "Difference" results between two Date/Time fields
    By RitaB in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2013, 03:19 PM
  5. 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
  6. [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
  7. Combining separate Date and Time Fields
    By thegreenape in forum Excel General
    Replies: 4
    Last Post: 11-04-2006, 10:44 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