[python-win32] datetime values in adodbapi
Bob Kline
bkline at rksystems.com
Tue Nov 7 11:40:15 EST 2017
On Tue, Nov 7, 2017 at 10:49 AM, Dennis Lee Bieber
<wlfraed at ix.netcom.com> wrote:
> >> When running under Python 2.7.13, the first print statement shows that
> >> the datetime value has been correctly retrieved, preserving the
> >> precision:
> >>
> >> d=2017-11-04 07:52:18.110000
> >>
> Given that string of 0s, the only thing I'd be able to conclude from
> the above is that the /formatting/ of the output specified a high
> precision, which may not be in the data itself.
The adodbapi package returns standard Python library datetime objects
for non-NULL values retrieved from SQL Server DATETIME columns, so
that's what row.d is. The fact that the printed representation of the
value has trailing zeros reflects the default formatting for datetime
objects.
--
Bob Kline
http://www.rksystems.com
mailto:bkline at rksystems.com
More information about the python-win32
mailing list