Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I have just tried it in Python 2.6 with pyodbc and MSSQL 2008 - it gives me a datetime object. Commented Aug 24, 2011 at 8:47
  • @Artsiom Is your column of type DATE or DATETIME? Commented Aug 24, 2011 at 8:54
  • 1
    @Artsiom Yes, this problem seems to only affect DATE columns. Commented Aug 24, 2011 at 9:00
  • I can't check this with DATE column but code.google.com/p/pyodbc/wiki/DataTypes tells that all should be ok. Anyway you can try to use datetime.strptime method to convert string to datetime object if needed. Commented Aug 24, 2011 at 9:07
  • I am also getting this issue. Again, specifically with DATE, not DATETIME. Commented Mar 31, 2017 at 11:05