On Thu, Sep 3, 2015 at 1:05 PM, Massi <massi_...@msn.com> wrote: > Hi everyone, > > I'm trying to use sqlalchemy (0.9.10) to read a sqlite table which contains > some datetime columns. As the title says these column are given in the > format YYYY-MM-DDTHH:mm:ss (I did not create the table). When I execute the > query, it succeeds, but when I try to convert the rows to lists I get the > following error: > > ValueError: Couldn't parse datetime string: u'1957-09-04T23:04:37' > > If I try to create a similar table via sqlalchemy and then to read the data > everything works fine. The data in this case is stored in the format > YYYY-MM-DD HH:mm:ss. > Any hint? > > Thanks in advance! >
You could try passing the regexp parameter to the DateTime column in your table definition: http://docs.sqlalchemy.org/en/rel_1_0/dialects/sqlite.html#sqlalchemy.dialects.sqlite.DATETIME Hope that helps, Simon -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.