+ Reply to Thread
Results 1 to 8 of 8

Difference between two timestamps

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Corpus Christ, TX
    MS-Off Ver
    Excel 2010
    Posts
    23

    Difference between two timestamps

    All,

    I have two timestamp fields from which I need to extract the difference.

    Please Login or Register  to view this content.
    The formula is B2-A2 and the Difference field is a custom field using h:m:s.

    As you can see, the difference is correct, except in military time. The correct answer should be 5:41:33.

    What can I do to correct this?

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Difference between two timestamps

    formattime.png

    Format the cell to AM/PM.

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    Corpus Christ, TX
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Difference between two timestamps

    That corrects the format of the time, but I don't need to display AM/PM. I just want to know the difference in HMS so I can total it up at the end of the worksheet.

  4. #4
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Difference between two timestamps

    Then format it as number. Sum the seconds.

  5. #5
    Registered User
    Join Date
    05-15-2013
    Location
    Corpus Christ, TX
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Difference between two timestamps

    Okay... That makes sense. However, when I get to the point of totaling the seconds, how do I convert that to h:m:s with out AM/PM or military time?

  6. #6
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Difference between two timestamps

    =TEXT(B1-A1,"h:mm")

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Difference between two timestamps

    It has nothing to do with military time; the difference is 17 hours, not 5.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    05-15-2013
    Location
    Corpus Christ, TX
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Difference between two timestamps

    Wow. I completely missed the obvious. Thank you for clarifying!

+ 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. Difference between two timestamps within same cell
    By Jooakim in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 10-20-2013, 05:24 PM
  2. Replies: 2
    Last Post: 02-16-2013, 03:32 PM
  3. Sum of timestamps
    By bobsmith2008 in forum Excel General
    Replies: 3
    Last Post: 05-11-2010, 08:30 AM
  4. Replies: 1
    Last Post: 07-06-2006, 03:10 AM
  5. [SOLVED] how to find time difference between timestamps to a millisecond?
    By sp in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-16-2006, 01:15 PM

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