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
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
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
Try this formula in C1
=INT(B1-A1)&" days "&TEXT(B1-A1,"h:mm")
Audere est facere
that formula above shoudl work,
=B1-A1, then just format as custom format
or what ever format you would like to display it as.Please Login or Register to view this content.
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks