Date Time Comparison

yessir

Board Regular
Joined
Jun 7, 2019
Messages
103
Office Version
  1. 2021
Platform
  1. MacOS
I'm trying to use the data in a pivot table and the information is entered into one cell as dd hh:mm:ss. How would I break this out if I wanted to manipulate the data, would it be with a pivot table or formula? I have two columns next to each other with dd hh:mm:ss format with different times and I want to calculate the time elapsed between them. Anything helps!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Your question is too vague to answer. Can you provide sample data?
 
Upvote 0
I want to calculate how much time change has occurred. The format is DATE HOUR:MINUTE:SECOND. I want to find the difference X. Hope this helps


TimeTimeDifference
2 4:30:012 5:01:01X
4 23:55:005 00:25:00X
5 22:12:006 01:00:00X
1 12:00:011 17:00:00X
 
Upvote 0
Are the time columns date/time data type or are they strings?
 
Upvote 0
Since they're already in date/time format, you should be able to subtract them. The difference will be in days. Multiply by 24 to get hours.
Book1
ABC
1TimeTimeDifference in hours
22 04:30:012 05:01:010.517
34 23:55:005 00:25:000.500
45 22:12:006 01:00:002.800
51 12:00:001 17:00:005.000
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=(B2-A2)*24
 
Upvote 0
I receive an error. I believe I have it in the wrong format, currently in General.
 
Upvote 0
Do a check =ISNUMBER(cell)
Does this return TRUE or FALSE?
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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