New submission from Robert Pollak <robert.pol...@posteo.net>:

Currently, fields are converted to datetime as described in 
https://docs.python.org/3/library/sqlite3.html#sqlite3.PARSE_COLNAMES :

'select x as "x [datetime]" from table'

In my use case I don't know the names and locations of the datetime fields in 
advance. So I would need to do pandas.read_sql_query('select * from table', 
con) and get correct datetime columns.
(My current workaround is try calling pandas.to_datetime on each text column 
afterwards.)

The type info has to be available in the sqlite database, because I see that 
SQLiteStudio correctly detects the datetime columns.

----------
components: Library (Lib)
messages: 329128
nosy: jondo
priority: normal
severity: normal
status: open
title: sqlite3: "select *" should autoconvert datetime fields
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35145>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to