Forum Discussion
milliseconds diff
If millisecond are separated by colon, entire datetime is represented as text, As variant you may parse such texts on two parts separating milliseconds, convert both parts to numbers and sum them. Concrete formulas depends on source format, e.g. milliseconds are always have fixed length or not.
One more variant is split datetime on parts with Text to Columns and after combine columns back by formulas.
But perhaps it'll be easier to correct source data.
- SergeiBaklanNov 26, 2022Diamond Contributor
If you have actual time, not text which is looks like time, variant could be
=MOD(A1,1/24/60/60)*24*60*60*1000- AishaEdrahNov 26, 2022Copper ContributorThe time recorded for each second, I need to calculate time difference, my data is sensor data (acceleration x, y, z). I am trying to calculate total distance which needs the time difference like(c2-c1) for all rows.
Distance=(initial velocity*timediff+0.5*acceleration*timediff^2), so the initial velocity=0 but i was not able to get the actual distance, i am using python to calculate the distance- SergeiBaklanNov 27, 2022Diamond Contributor
AishaEdrah
I'm not sure about the formula and in which form and with which precision sensor returns the time.Back to Excel, in it 1 millisecond is equal to 1/24/60/60/1000 (~1.157e-08).
As an example, you may add two time values in A1 and A2, formula below correctly returns difference in milliseconds.