How does UniDAC handle SQLite DateTime fields? [Urgent]
Posted: Fri 25 Nov 2011 10:53
I imported Access tables into a SQLite database using "Navicat for SQLite" tool. The "Date/Time" fields of Access were converted to "DATETIME" type in SQLite (can see in table designer of Navicat tool).
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:
Please indicate:
1) What is wrong
2) Steps needed to debug and resolve
3) Example of how to get the correct value
TIA.
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.