date/time calc --- date and times are in different columns

dmj120

Active Member
Joined
Jan 5, 2010
Messages
286
Office Version
  1. 365
  2. 2019
  3. 2010
I've tried searching, and did find several threads about calculating time, but I didn't see anything that really connected with what I'm trying to do.

So I have a table with an "entry date/time" and "exit date/time" (see example). The time columns are formatted [$-F40]h:mm AM/PM. What I'd like to do is calculate the time (in hours) between the entry to exit times; and if the it goes across days, include the days. I'm not really firm on the "total time" format, I just want to be able to identify the number of days and hours if it goes multiple days, otherwise a simple hours/minutes will be cool.

Any ideas??

Something like:

EntryExitTotal time
8/15/20171:30 pm8/15/172:30 pm1 hour
8/15/201712:00 pm8/20/20171:30 pm5 days 1 hour 30 minutes

<tbody>
</tbody>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Re: date/time calc --- date and times are in diffeent columns

Maybe something like this:
Under Format-Custom enter:
d "day(s)" h "hour(s)" mm "minutes"

<colgroup><col width="265"></colgroup>
Excel Workbook
ABCDE
1EntryExitTotal time
28/15/20171:30 PM8/15/20172:30 PM0 day(s) 1 hour(s) 00 minutes
38/15/201712:00 PM8/20/20171:30 PM5 day(s) 1 hour(s) 30 minutes
Sheet
 
Upvote 0
Re: date/time calc --- date and times are in diffeent columns

Sweet, thanks!!
 
Upvote 0
Re: date/time calc --- date and times are in diffeent columns

You're welcome. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top