[python-win32] datetime values in adodbapi

Tim Roberts timr at probo.com
Tue Nov 7 01:16:21 EST 2017


On Nov 6, 2017, at 2:47 PM, Max Slimmer <maxslimmer at gmail.com> wrote:
> 
> Coincidentally I ran into this issue last week. From what I could gather the MS SQL data type can accept values with no more than millisecond precision. This is true using parameterized statements through adodbapi and also T-SQL and implicit conversion from char to datetime. The type accepts up to seven places (nano seconds).
> 

Your post is not exactly correct, and the difference is critically important.  The adodbapi happens to display time strings with 7 decimal digits, but that is TOTALLY unrelated to the precision with which the underlying database engine stores its date/time values, or the precision returned by the NOW() function in your database engine.  This is not specified by the standard.  By default, for example, the MySQL DATETIME time does not store fractional seconds at all.
— 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20171106/08f0e8fb/attachment.html>


More information about the python-win32 mailing list