DateTime.DateFormat = "dd/MM/yyyy HH:mm:ss"
Dim strDateTime As String
strDateTime = DateTime.DateParse(DateTime.Date(DateTime.Now))
Log(strDateTime)
datHubber.ExecNonQuery2("INSERT INTO MessageLog VALUES(?,?,?,?,?,?)" , Array As String (intMessageID, MobileNumber, strDateTime, Message, Direction, Status))
The Log() shows the numeric "date", the same as gets recorded in the table.
This is the code that creates the table:
B4X:
If datHubber.ExecQuerySingleResult("SELECT count(name) FROM sqlite_master WHERE type='table' AND name ='MessageLog'") = 0 Then
datHubber.ExecNonQuery("CREATE TABLE MessageLog (MessageID INTEGER, MobileNumber TEXT, DateCreated TEXT, Message TEXT, Direction TEXT, Status TEXT)")
End If