SQL Bulkcopy YYYYMMDD problem

后端 未结 3 1787
后悔当初
后悔当初 2020-12-12 00:40

I have a String to Date conversion problem using SQL Bulkcopy in asp.net 3.5 with C#

I read a large CSV file (with CSV reader). One of the strings read should be loa

3条回答
  •  时光取名叫无心
    2020-12-12 00:50

    It's not entirely clear how you're using SqlBulkCopy, but ideally you shouldn't be uploading the data to SQL Server in string format at all: parse it to a DateTime or DateTimeOffset in your CSV reader (or on the output of your CSV reader), and upload it that way. Then you don't need to worry about string formats.

提交回复
热议问题