简体   繁体   中英

Issues with ODBC Drivers formatting date fields incorrectly

I have been having problems with using mulitple ODBC connections with different drivers to linked tables. When I use the ODBC driver 'SQL Native Client 10.0' the dates format correctly (For Example, US Layout, 02/15/2013 ) and within the tables and the dates have a data type of Date/Time.

But when I change the ODBC to an identical connection, but change the driver to SQL Server I notice that within all the linked tables, the data types for Date/Time are changes to Text and the date appears like so - 2013-02-15 00:00:00.0000000 .

I need the SQL Server driver to hold the Date/Time data types.

Anyone have any idea on how to fix this?

I found out the issue after wrecking my brains.

The sql server was setup to hold the dates as datetime(2). This was changed to datetime and it solved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM