In the GUI I have an calendar element.
Later in the GUI the date-boundaries should be choosen with the calendar element, to show the report
only for this timeframe.
In a "report window" date and time are 2 different columns.
The data itself is determined from another c++ programm and written in a sqlite3 db.

Now the question, is it ok to use the sqlite3 DATETIME('now') function to store the data in sqlite and "parse/split" it when it is retrieved from the GUI into date and time part ?
In this case I thought of a trigger to fill the db automatically
-- ********************************************************************
CREATE TRIGGER insert_t1_timestamp AFTER  INSERT ON t1
BEGIN
 UPDATE t1 SET timestamp = DATETIME('NOW')  WHERE rowid = new.rowid;
END;
-- ********************************************************************
If I dont use the trigger, would I comitt a string to my timestamp column ?
Has someone an example ?
And the other way, if I select from the db, how to I get the timestamp in the
c++ prog ?

thx in advance
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to