BCP with Date (Datetime) SQL Server 2008


When you import data from text file with date value to a target table with column data type DATE, you need to make sure the data format in your text file is YYYY-MM-DD. Another walk around is to modify your target table column as a datetime column to avoid conversion error generated from running bcp command.

Check more from this thread:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f587a76c-65e4-46f0-8c91-a63a6a9947d9/bcp-import-date-into-field-type-of-date-fails?forum=transactsql

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s