# Why Time is not same when extracting from DateTime



## Sufiyan97 (Dec 19, 2022)

I want help in getting time value of DateTime from column A as per manual typed time in column C

Why there is a difference?

Book3ABCDEF1DataExtracted TimeManual TimeTestFormat22:00:00 AM2:00:00 AM2:00:00 AMFALSETime32:00:00 AM0.0833333330.083333333FALSEGeneral (Pasted as Values)456Sheet2Cell FormulasRangeFormulaB2B2=A2-INT(A2)D2:D3D2=B2=C2


----------



## Fluff (Dec 19, 2022)

It's down to floating point precision. Floating-point arithmetic may give inaccurate result in Excel - Office


----------



## Sufiyan97 (Dec 19, 2022)

Thanks Fluff,

is there a way to handle it?


----------



## Joe4 (Dec 19, 2022)

Sufiyan97 said:


> Thanks Fluff,
> 
> is there a way to handle it?


Rounding the results and comparing them is one way (as shown in that article).


----------



## Sufiyan97 (Dec 19, 2022)

Joe4 said:


> Rounding the results and comparing them is one way (as shown in that article).



Yes that is it, but I was trying to solve the problem in below thread

Can you please look into this.









						COUNTIF Problems
					

I'm having a problem with a COUNTIFS function that I've been working with. The logic of it seems sound to me but once the date moves to 10/2/2022 things seem to break.  The idea is to see if a machine is running based on the information in the table to the right.  Can someone help me understand...




					www.mrexcel.com


----------

