• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import sqlite3
2import datetime
3
4con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES)
5cur = con.cursor()
6cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),))
7dt = cur.fetchone()[0]
8print dt, type(dt)
9