[issue14720] sqlite3 microseconds

Antoine Pitrou report at bugs.python.org
Fri May 4 17:46:55 CEST 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

Can be reproduced with:

>>> con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_DECLTYPES)
>>> cur = con.cursor()
>>> cur.execute("CREATE TABLE t (x TIMESTAMP)")
<sqlite3.Cursor object at 0x7f90a4f69ea0>
>>> cur.execute("INSERT INTO t (x) VALUES ('2012-04-04 15:06:00.456')")
<sqlite3.Cursor object at 0x7f90a4f69ea0>
>>> cur.execute("SELECT * FROM t")
<sqlite3.Cursor object at 0x7f90a4f69ea0>
>>> cur.fetchall()
[(datetime.datetime(2012, 4, 4, 15, 6, 0, 456),)]

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14720>
_______________________________________


More information about the Python-bugs-list mailing list