I'm new to programing and to B4Android. I am trying to create an app that will let me insert the time into an EditText, display it on a Label and then start counting. How do I parse my result in EditText into Hours / Minutes using B4A? I would really appreciate any help!
Asked
Active
Viewed 3,241 times
1 Answers
1
If you just want to find the hours and minutes you can use code similar to:
Dim i As Int
i = EditText1.Text.IndexOf(":")
If i = -1 Then
Msgbox("Invalid value.", "")
Return
End If
Dim hours, minutes As Int
hours = EditText1.Text.SubString2(0, i)
minutes = EditText1.Text.SubString(i + 1)

Erel
- 1,802
- 2
- 15
- 58
-
Thanks Erel! I really appreciate your help. That's a start, I'll figure the rest from here and ask more if I stumble again. Thanks! – baythedog Nov 09 '11 at 17:33