Further, when viewing the SQLite database table in Navicat, it can be observed that the date values were imported correctly into SQLite.
Using UniQuery component and SELECT statement, when iterating through result set the value for all rows of the converted column is:
12/30/1899
..which is an incorrect value, because it is different from the date in the table.
Using the following code to get the values in the date field:
Code: Select all
while not uq.Eof do
begin
ShowMessage( FormatDateTime('yyyy-mm-dd', uq.FieldByName('f').AsDateTime) ) ;
uq.Next;
end;
Please indicate:
1) What is wrong
2) Steps needed to debug and resolve
3) Example of how to get the correct value
TIA.