First of all I hope this is the right place to ask. I have a Python script which parses data from a few links. In the parsers I parse also the date of the last modified article.
This is the output of the date in the code;
2012-08-07T09:00:00 # Year, month, day, hour, minute, seconds
I have to throw this output to a Mysql database with the type DATETIME When I throw this to the database, I check the field later on, I only have;
0000-00-00 00:00:00
(Although I am using SQLALchemy, it gives me the warning when inserting to the table);
/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py:331: Warning: Out of range value for column 'cdate' at row 1
cursor.execute(statement, parameters)
/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py:331: Warning: Out of range value for column 'mdate' at row 1
cursor.execute(statement, parameters)
Well, clear enough I am not putting the right content inside, so I wonder if there is any converter in Mysql or you know something in Python that will work this out for me. I guess formating the whole string will be a bit of a pain and "useless" if there is something like that already.
Cheers. - Ephexeve