+ Reply to Thread
Results 1 to 3 of 3

Subtracting datetime cells

  1. #1
    Registered User
    Join Date
    09-25-2007
    Posts
    4

    Subtracting datetime cells

    I am trying to subtract two cells that are in the format yyyy-mm-dd hh:mm:ss AM to create a column "Duration since last event". I have looked at subtracting them and changing the formatting of the answer cell, the datedif() function... everything!


    Ideally I would like my results to be like so (where B3= A3-A2) with column B in hh:mm:ss

    A B

    1997-03-03 4:00:00 PM
    1997-03-03 6:00:00 PM 02:00:00
    1998-03-03 6:00:00 PM 8760:00:00

    Is this possible?
    Thanks in advance for any help!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    =A3-A2 should work in B3

    You need to format B3 as [hh]:mm:ss

    you need the square brackets to display hours over 24

  3. #3
    Registered User
    Join Date
    09-25-2007
    Posts
    4
    Thank you!
    My "Calculations" was turned on manual and I forgot - so all the answers were wrong before.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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