current_time and local_time in SQLITE lazarus / 16-Databases ---------------------------------------------------------------------- magleft · 2016-10-05 05:52 Hi, I want create the following table in SQLITE: 'CREATE TABLE Table1('                     +'id INTEGER NOT NULL PRIMARY KEY ON CONFLICT ROLLBACK AUTOINCREMENT,'                     +' mera DATE DEFAULT CURRENT_DATE,'                     +' wra TIME DEFAULT DEFAULT CURRENT_TIME,'                     +' kidndVARCHAR(50)' How can added the local time?? Thanks ---------------------------------------------------------------------- LacaK · 2016-10-05 06:53 Try    DEFAULT (datetime('now','localtime')) for datetime values formated YYYY-MM-DD HH:MM:SS or    DEFAULT (date('now','localtime')) for date value formated YYYY-MM- DD or    DEFAULT (time('now','localtime')) for time value formated HH:MM:SS ---------------------------------------------------------------------- totya · 2016-10-06 04:52 Quote from: magleft on October 05, 2016, 07:52:10 amHi, I want create the following table in SQLITE: 'CREATE TABLE Table1('                     +'id INTEGER NOT NULL PRIMARY KEY ON CONFLICT ROLLBACK AUTOINCREMENT,' Hi! Slightly offtopic thing, but  AUTOINCREMENT isn't needed anymore, see: http://wiki.freepascal.org/User_Changes_3.0#TSQLite3Connection_INTEGER _PRIMARY_KEY_columns_are_mapped_to_TAutoIncFields http://www.sqlite.org/autoinc.html