Am I doing something wrong or is there a HUGE bug in date handling in the SQLiteDatabase?
To test out what datatypes Xojo actually returns for Sqlite field 'Data Types"' (BTW RecordSet.ColumnTypes reports often ignores SQLite affinity rules for the specified Column type in what it reports) I created an in memory SQLite DB with a table called Numtest which has a column named 'a DATE' that has a column type of DATE. Prior to this I inserted one record.
Dim D as New Date Dim RS as RecordSet= DB.SQLSelect("SELECT * FROM NumTest") RS.Edit RS.Field("a DATE").DateValue = D RS.Update RS.Close RS = DB.SQLSelect("SELECT * FROM NumTest") Dim D1 as Date = RS.Field("a DATE").DateValue RS.Close Dim C as New Clipboard C.Text = "Input Date: " + D.SQLDateTime + EndOfLine + "Output Date: " + D1.SQLDateTime
This is what is on the clipboard:
Input Date: 2019-05-24 23:17:23
Output Date: 2019-05-23 23:53:30
If I am not doing something stupid that is very bad!!!!