Shay Well-Known Member Licensed User Longtime User Mar 28, 2011 #1 Hi I found several posts, but none was helpful looking to do: from the click demo code, I have the stopper which is Chrono.text - giving for example 12:30 (12m30s) I wish to get the "12" how do I do that? Thanks
Hi I found several posts, but none was helpful looking to do: from the click demo code, I have the stopper which is Chrono.text - giving for example 12:30 (12m30s) I wish to get the "12" how do I do that? Thanks
klaus Expert Licensed User Longtime User Mar 28, 2011 #2 You have several possibilities: txt1 = "12:30" if there are always 2 characters for the hour (08:30) txt = txt1.SubString2(0,2) if there can be 1 or 2 characters for the hour (8:30) txt = txt1.SubString2(0,txt1.IndexOf(":")) Best regards. Last edited: Mar 28, 2011 Upvote 0
You have several possibilities: txt1 = "12:30" if there are always 2 characters for the hour (08:30) txt = txt1.SubString2(0,2) if there can be 1 or 2 characters for the hour (8:30) txt = txt1.SubString2(0,txt1.IndexOf(":")) Best regards.
Shay Well-Known Member Licensed User Longtime User Mar 28, 2011 #3 Thanks first suggestion is working (2nd does not exist) Upvote 0
K kickaha Well-Known Member Licensed User Longtime User Mar 28, 2011 #4 klaus said: You have several possibilities: txt1 = "12:30" if there are always 2 characters for the hour (08:30) txt = txt1.SubString2(0,2) if there can be 1 or 2 characters for the hour (8:30) txt = txt1.SubString2(0,txt1.InsexOf(":")) Best regards. Click to expand... An amusing slip by Klaus, should of course have been IndexOf. Upvote 0
klaus said: You have several possibilities: txt1 = "12:30" if there are always 2 characters for the hour (08:30) txt = txt1.SubString2(0,2) if there can be 1 or 2 characters for the hour (8:30) txt = txt1.SubString2(0,txt1.InsexOf(":")) Best regards. Click to expand... An amusing slip by Klaus, should of course have been IndexOf.
klaus Expert Licensed User Longtime User Mar 28, 2011 #5 Thank's . Original post updated ! Best regards. Upvote 0