BCP IN Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format

孤人 提交于 2019-12-08 08:47:31

You may want to check the default language settings for the target database, as that is used to interpret dates i.e. DATEFORMAT.

A solution would be reformat the date into ISO Standard format (YYYYMMDD) in the data file.

Alternatives would be either reformat the date to match the DATEFORMAT of the target database or change the DATEFORMAT by changing the database's default language setting.

See https://support.microsoft.com/en-us/kb/173907

As noted in the KB, changing the server's regional setting in the Control Panel will not change how Sql Server interprets the dates.

Try using SQLCHAR in format file instead of SQLDATETIME. Set data in datetime field into your local format and use -R key for bcp.exe run.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!