Android Question Error: Invalid Double NumberFormatException


Active Member
Licensed User
I have a custom Type, like this:
Type MyCustomType (UserID As Int, Active As Boolean, EffDt As Long)

I read from a database (msaccess) and load the retrieved values into the custom Type, like this:
Dim m As Map
m = rows.Get(i)
Select Job.JobName
  Case "MyJobName"
    Dim pr As MyCustomType
    pr.UserID = m.Get("UserID")
    pr.Active = m.Get("Active")
    pr.EffDt = m.Get("EffDt")
End Select

My goal is simply to load the ticks into pr.Effdt. I can see from the Log that it has retrieved ticks, which is perfect, but marked the value as a /Date/ - see image. This is okay with me, but it causes an error on the line pr.Effdt=m.Get("EffDt"). Strangely, the error says "Invalid double" even though the datatype of the target field is Long.


This should work, no? Is there another (better) way to load a date?

P.S., my temporary workaround is:
Dim s As String = m.Get("EffDt")
s = s.SubString2(6, s.Length-2)
pr.EffDt = s
Last edited:


Active Member
Licensed User
Interesting - didn't know KeyValueStore2 was that powerful. But, I need to access the data from my web server as the data is viewed/manipulated from a website, too. I thought a database sitting on the web server made the most sense, but now I'm wondering if it would be wiser to use KeyValueStore2 and sync it to my database somehow.
Upvote 0