Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
python
/
cpython3
/
23cbd8a6564df0ac3df339f91196c45f3e626d32
/
.
/
Doc
/
includes
/
sqlite3
/
parse_colnames.py
blob: cc68c76459eceabe2ec868ac8b1f373d59f303cb [
file
] [
log
] [
blame
]
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
))