Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 1 | import sqlite3 |
2 | import datetime | ||||
3 | |||||
4 | con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES) | ||||
5 | cur = con.cursor() | ||||
6 | cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),)) | ||||
7 | dt = cur.fetchone()[0] | ||||
8 | print(dt, type(dt)) |