I have a time string in a text-formatted cell that looks like this: "102:16:47.04". How can I convert it to time string like this: "102:16" ?
2 Answers
If your string is in A1, you can get the substring via this formula:
=LEFT(A1,(FIND(":",A1,FIND(":",A1)+1))-1)
-
I'm assuming your string is just
102:16:47.04
without the quotes around it.– jonscaCommented Dec 31, 2018 at 4:13 -
Your Formula returns
"102:16
last ` " ` is missing it should"102:16"
!! Commented Dec 31, 2018 at 8:43 -
1@RajeshS As I wrote in my comment immediately above yours, I'm assuming the OP is only processing the content of the string and has delineated it with the quotes. Please tone it down a bit.– jonscaCommented Dec 31, 2018 at 8:45
-
,, since the Time is within the Quotes and OP wants to return
"102:16"
then onlyLEFT
Function can do it=LEFT(A1,7)&""""
!! Commented Dec 31, 2018 at 8:58
"102:16:47.04"
,, what you have entered beyond the24 Hrs Clock
!! Edit the Time value otherwise this may attract Down Vote to Close the post.