Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 BCP and date formats

Author  Topic 

Beachsandintoes
Starting Member

15 Posts

Posted - 2005-09-20 : 15:15:54
Hi,

Is there a way to programmatically accept different date formats in BCP or BULK INSERT? The application will import from different data source which will probably have different date formats.

Is the better answer to require that the files be sent with a specific date format?

Thanks.

- Beach

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-09-20 : 15:19:02
Import your data into a staging table. Have the datetime column be a varchar. Then use T-SQL to move your data from the staging table into your real table, for the varchar/datetime column, use CONVERT with a style so that there is no confusion what the actual date is.

Tara
Go to Top of Page
   

- Advertisement -