When I'm trying to use Right , LEFT , LEN , FIND functions in excel I am getting wrong results as mentioned in the snapshot also i cant find a right answer online
CodePudding user response:
Dates are numbers. So use INT:
- In
B2:=INT(D2), and apply a number format ofyyyy-mm-dd. - In
C2:=D2-B2, and apply a number format ofhh:mm:ss.
CodePudding user response:
To extract date from datetime value use INT() function like-
=INT(A1)
To extract time from datetime values use MOD() function like-
=MOD(A1,1)
You must then format the resultant cells as desired date/time format or use TEXT() function.



