You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like the conversion does not handle the datetime.date datatype properly.
Traceback (most recent call last):in __read
File "fdb\\fbcore.pyo", line 3338, in execute
File "fdb\\fbcore.pyo", line 3006, in _execute
File "fdb\\fbcore.pyo", line 2812, in __Tuple2XSQLDA
File "fdb\\fbcore.pyo", line 2270, in _convert_timestamp
AttributeError: 'datetime.date' object has no attribute 'date'
There is an obvious workaround of combining the datetime.date object into a datetime.datetime datatype when one knows he is going to write a datetime.date object into a TIMESTAMP just like this:
from datetime import date
from datetime import datetime
dateToInsert = datetime.date.today()
fixedDateToInsert = datetime.combine(dateToInsert, datetime.min.time())
But it would look much more pythonic if this was implicitly handled by the conversion function.
Submitted by: Dominik Psenner (dpsenner)
Looks like the conversion does not handle the datetime.date datatype properly.
Traceback (most recent call last):in __read
File "fdb\\fbcore.pyo", line 3338, in execute
File "fdb\\fbcore.pyo", line 3006, in _execute
File "fdb\\fbcore.pyo", line 2812, in __Tuple2XSQLDA
File "fdb\\fbcore.pyo", line 2270, in _convert_timestamp
AttributeError: 'datetime.date' object has no attribute 'date'
Commits: a3d6310 FirebirdSQL/fbt-repository@7ed6220
The text was updated successfully, but these errors were encountered: