Home > other >  How to solve issue in using Right , LEFT , LEN , FIND functions in excel
How to solve issue in using Right , LEFT , LEN , FIND functions in excel

Time:10-13

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

enter image description here

CodePudding user response:

Dates are numbers. So use INT:

  • In B2: =INT(D2), and apply a number format of yyyy-mm-dd.
  • In C2: =D2-B2, and apply a number format of hh:mm:ss.

enter image description here

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.

enter image description here

  • Related