Hi all
I use this code to get number of milliseconds from the beginning of the day:
the code is working very well, But if the device default language is Arabic it gives this error:
I use this code to get number of milliseconds from the beginning of the day:
B4X:
DateTime.TimeFormat = "HH:mm:ss.SSS"
Dim m As String=DateTime.Time(DateTime.Now)
Log(m)
' if the device default language is Arabic it gives ١٥:٢٩:١٧.٨٨٦
m=m.Replace(":"," ")
m=m.Replace("."," ")
Dim r() As String=Regex.Split(" ",m)
Dim q,qq,qqq,qqqq As Int
q=r(0) : qq=r(1) : qqq=r(2) : qqqq=r(4)
mls=q*3600000+qq*60000 +qqq*1000+qqqq
the code is working very well, But if the device default language is Arabic it gives this error:
B4X:
(NumberFormatException) java.lang.NumberFormatException: For input string: "١٥"