Results 1 to 8 of 8

Thread: Calculate Difference Between Start Date Time And End Date Time

  1. #1
    Junior Member
    Join Date
    Aug 2016
    Posts
    12
    Rep Power
    0

    Calculate Difference Between Start Date Time And End Date Time

    Please help to subtract the start time minus end time , it will help me to calculate the actual time taken.

    formattedClosedDate formattedStartTime
    Aug 17, 2016, 7:28:14 AM Aug 17, 2016, 6:34:53 AM

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    Try this

    =TEXT(DATEVALUE(LEFT(A1,12))+TIMEVALUE(MID(A1,14,4 0))-DATEVALUE(LEFT(B1,12))-TIMEVALUE(MID(B1,14,40)),"HH:MM:SS")
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Aug 2016
    Posts
    12
    Rep Power
    0
    Thanks, however no luck it gives #VALUE!

  4. #4
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    659
    Rep Power
    13
    Quote Originally Posted by zorro View Post
    Thanks, however no luck it gives #VALUE!
    Give this formula a try...

    =A1-B1

    and format the cell with the time format of your choice. If that does not work, then see if this one does instead...

    =TEXT(SUBSTITUTE(A1,",","",2)-SUBSTITUTE(B1,",","",2),"hh:mm:ss")
    Last edited by Rick Rothstein; 08-19-2016 at 07:24 PM.

  5. #5
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    12
    Please help the helpers to help you: post a sample workbook!

  6. #6
    Junior Member
    Join Date
    Aug 2016
    Posts
    12
    Rep Power
    0
    Sample file attached, please help.
    Attached Files Attached Files

  7. #7
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,122
    Rep Power
    10
    Hi

    Swap the cells in the formula.

    =TEXT(SUBSTITUTE(B2,",","",2)-SUBSTITUTE(A2,",","",2),"hh:mm:ss")

    HTH
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  8. #8
    Junior Member
    Join Date
    Aug 2016
    Posts
    12
    Rep Power
    0
    Perfect, thanks for all your help, its working as expected.

Similar Threads

  1. Extract Time from a Date&time cell
    By Feebles in forum Excel Help
    Replies: 4
    Last Post: 11-09-2015, 06:24 AM
  2. Replies: 5
    Last Post: 06-15-2013, 12:40 PM
  3. Calculate Time Difference Between Time In HH:MM
    By Stalker in forum Excel Help
    Replies: 8
    Last Post: 03-28-2013, 03:27 PM
  4. Date Format From Start Day To End Day
    By PcMax in forum Excel Help
    Replies: 2
    Last Post: 03-10-2013, 02:07 PM
  5. Displayin Date/Time in "original" time zone
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 04-21-2012, 02:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •