+ Reply to Thread
Results 1 to 7 of 7

How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    hillo
    MS-Off Ver
    Excel 2010
    Posts
    2

    How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    How can I obtain the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM" (without the quotes).

    Thanks in advance

    Alan

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    If your two dates are in B2 and B3, the following formula should work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please click the * icon below if I have helped.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    Hi, and welcome to the forum

    =(B1-A1)*24
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    You could try this:

    If 1st date is in A1, and second date is in A2:

    =(A2-A1)*24

    - Moo
    Last edited by Moo the Dog; 01-15-2013 at 06:47 PM. Reason: Looks like it's 'Slow-Poke Tuesday' for me. :)

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    hillo
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    Still with the issue:
    =1/16/2013 9:55:43 AM-1/16/2013 9:55:23 AM

    Excel does not recognize it... I get an error always

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    Hi,

    Are you sure those dates are date NUMBERS albeit formatted as mm/dd/yyyy hh:mm:ss.

    And have you formatted the cell in which you're putting the formula as a number not date?

    If so I suggest you upload your workbook, or at least the relevant bit of it.

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to get the difference in hours of 2 dates with this format "1/15/2013 2:06:56 PM"

    Hi

    1/16/2013 9:55:43 AM-1/16/2013 9:55:23 AM

    Assuming the red Date/Time is in A1 and Blue Date/Time is in A2
    Subtract smaller Date/Time from the larger Date/Time
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And format cells as hh:mm:ss
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

+ 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