iOS Question Get the tick value of a date string


Well-Known Member
Licensed User
Is this code right? I want to obtain the tick value of a date "Thedate" registered in a database as date (AAAA-MM-JJ). It seems it does not work.
What is the the syntax of "DateTime.DateTimeParse(Mydate,"")" if I want only date and not time. (I have not time in the database)

Dim  Mydate, Newdate, As Long
Mydate = M.Get("Thedate")
Newdate = DateTime.DateTimeParse(Mydate,"")


Licensed User
In your code you define DateDebut as a Long.
Then you use TheDateDebut = DateTime.DateParse(DateDebut).
But DateTime.DateParse(DateDebut) expects a String and not a Long.
Put a breakpoint in line 204 and look at DateDebut.


Well-Known Member
Licensed User
In fact, DateDebut is in my database phpmyadmin as a date (yyyy-MM-dd). There is not variable as date in B4i and i don't know if i have to consider DateDebut as a long or as a string. It seems i have to consider as a string.