Hello,
I've an issue with SQLite where milliseconds aren't stored into the database.
How can I store ms H in TTIme and TDateTime fields ?
Thank you
SQlite : How to store ms in TTIme and TDateTime fields ?
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Re: SQlite : How to store ms in TTIme and TDateTime fields ?
Hello,
Below is a sample of using TimeStamp:
Below is a sample of using TimeStamp:
Code: Select all
CREATE TABLE T_TS(F_TS TIMESTAMP);
...
UniQuery.SQL.Text := 'SELECT * FROM T_TS';
UniQuery.Open;
UniQuery.Append;
UniQuery.FieldByName('F_TS').AsSQLTimeStamp := DateTimeToSQLTimeStamp(now);
UniQuery.Post;
ShowMessage(SQLTimeStampToStr('yyyy-MM-dd HH:mm:ss Z', UniQuery.FieldByName('F_TS').AsSQLTimeStamp);