Staging
v0.8.1
https://github.com/python/cpython
Raw File
Tip revision: 27657e7cea26548958518144d63200d7a2333d1c authored by Larry Hastings on 04 February 2018, 23:40:56 UTC
Version bump for 3.5.5.
Tip revision: 27657e7
parse_colnames.py
import sqlite3
import datetime

con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES)
cur = con.cursor()
cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),))
dt = cur.fetchone()[0]
print(dt, type(dt))
back to top