Hi all!
Annoying error I got, read, but no solution I found.
Can somebody tell me where is the error?
thanks in advance
Steven
Annoying error I got, read, but no solution I found.
Can somebody tell me where is the error?
thanks in advance
Steven
B4X:
Sub dateparse2( sd As String) As String
Dim jo As JavaObject
jo.InitializeStatic("java.util.Locale")
jo.RunMethod("setDefault", Array As Object(jo.GetField("ENGLISH")))
Dim df As String = DateTime.DateFormat
Dim res As Long
Try
DateTime.DateFormat = "EEE, d MMM yyyy HH:mm:ss ZZZ"
res = DateTime.DateParse(sd.trim)
DateTime.DateFormat = df
Return DateTime.Date(res)
Catch
res = 0
Log("Error parsing Date 2: " & sd)
Return sd
End Try
End Sub