Hi @Greg Moulton
If you get the time, please check whether my formulas are helpful:For hour number: =-LOOKUP(0,-RIGHT(LEFT(A2,FIND(":",A2)-1),2))
For minute number: =TRIM(MID(SUBSTITUTE(A2,":",REPT(" ",100)),100,100))
For second number: =-LOOKUP(0,-LEFT(TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)),2))
AM or PM: =MID(TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)),FIND(" ",TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)))+1,2)
(If your time is like DST, MDT with 3 characters, then you may use =LEFT(RIGHT(A2,6),2)
instead.)
Then you may combine them with "Time" function (=IF(B9="PM",TIME(B6+12,B7,B8),TIME(B6,B7,B8))
), and set the cell format: h:mm:ss
.
If you do not list the hour, minute and second numbers, you may try =IF(MID(TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)),FIND(" ",TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)))+1,2)="PM",TIME(-LOOKUP(0,-RIGHT(LEFT(A2,FIND(":",A2)-1),2))+12,TRIM(MID(SUBSTITUTE(A2,":",REPT(" ",100)),100,100)),-LOOKUP(0,-LEFT(TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)),2))),TIME(-LOOKUP(0,-RIGHT(LEFT(A2,FIND(":",A2)-1),2)),TRIM(MID(SUBSTITUTE(A2,":",REPT(" ",100)),100,100)),-LOOKUP(0,-LEFT(TRIM(RIGHT(SUBSTITUTE(A2,":",REPT(" ",100)),100)),2))))
.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.