New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datetime fields with microsecond shows as None (SF bug #325) #24
Comments
Fix problem in Datetime with microsecond returns (Issue #24)
On MySQLdb < 1.2.5, MySQLdb returns None when fetching datetime/time values with fractional seconds. See farcepest/MySQLdb1#24
On MySQLdb < 1.2.5, MySQLdb returns None when fetching datetime/time values with fractional seconds. See farcepest/MySQLdb1#24
Sorry, i still have the issue on version 1.2.5 MySQL Server: 5.6.24 Homebrew Here is my table schema:
Test Code:
Output:
And the datetime value shows well in mysql shell. |
@lfyzjck |
@methane It works, thank you very much! But why MySQLdb don't fix this issue? it seems very critical. |
The author is inactive for these years. |
Original bug on https://sourceforge.net/p/mysql-python/bugs/325/
When SELECT datatime field which contained microseconds from DB(MariaDB 5.5 and MySQL 5.6). Result can not be converted to datetime.datetime and data in that field shows as None. I use MariaDB 5.5.27.
For example:
Make table in DB and fill its
Now we can get data.
After patch:
The text was updated successfully, but these errors were encountered: