+ Reply to Thread
Results 1 to 5 of 5

Elapsed time between two dates

  1. #1
    Registered User
    Join Date
    10-23-2008
    Location
    USA
    Posts
    78

    Elapsed time between two dates

    I have a date and time in one cell and another date and time in another. How do I calculate the elapsed time in days and hours?

    Example:
    A1 = 3/10 6 pm
    B1 = 3/16 4 pm
    C1 = difference in number of days and hours from B1-A1

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Elapsed time between two dates

    Simple stuff.

    Just format all these cells as "mm/dd/yyyy hh:mm:ss".
    If A1 has the start time and B1 has the end time,
    then the formula is =B1-A1

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Elapsed time between two dates

    Try this formula in C1

    =INT(B1-A1)&" days "&TEXT(B1-A1,"h:mm")
    Audere est facere

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Elapsed time between two dates

    that formula above shoudl work,

    =B1-A1, then just format as custom format

    Please Login or Register  to view this content.
    or what ever format you would like to display it as.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Elapsed time between two dates

    Note that using d in formatting will only show days up to 31 so if time period could be longer than 31 days you need another method, hence my suggestion.

+ 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