dede@i5:~> python Python 2.7.12 (default, Jul 01 2016, 15:36:53) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> d=datetime.datetime(2016, 12, 31, 10, 55, 10) >>> int(d.strftime("%s")) 1483178110 >>> datetime.datetime.fromtimestamp(1483178110) datetime.datetime(2016, 12, 31, 10, 55, 10) >>> d.strftime("%Y.%m.%d %H:%M:%S") '2016.12.31 10:55:10' |
CREATE VIEW Tescht AS SELECT datetime(date,
'unixepoch', 'localtime') FROM tabelle |
2016-12-31
10:55:10 |