I'm new to SQLite, and I was wondering what is the best format in SQLite for storing Date and Time?
I tried to save Date (similarly TIME too) using something like this (I set SQLite Date/Time field as CHAR)
SQLStr:='INSERT INTO MYTABLE ([DATE]) VALUES ('+#39+FormatDateTime('YYYY-MM-DD',MyDate)+#39+')';
The ExecSql worked (I think) since I can see the added date in the table.
But when I try to open the field using StrToDate function, it always says, for example, 2010-11-23 is not a valid date.
I'm not sure, but I think StrToDate is not appropriate for this operation. If so, what is?
Help?
Thanks! :)
I use D5,ZeosLib 6.6.6, and Sqlite3.dll