vendredi 17 avril 2015

SQLITE: create view with select DATETIME formatted

I have a Table in Sqlite with field DATA defined DATETIME.

For ODBC reason I have to create a view of this table with datetime converted in a string. This is my sqlite query with syntax problem:



CREATE VIEW TEST_VIEW AS SELECT strftime('%d-%m-%Y %H:%M:%S’, DATA / 1000, 'unixepoch’, ‘localtime’)
FROM TEST

Aucun commentaire:

Enregistrer un commentaire