date时间DataBase的列不能使用SQLBULKCOPY从Excel工作表中接受值
我有一个excel sheet
,它被复制到DataBase
。 excelsheet有一列作为DateOfBirth
,类似于DataBase中的表也是DateOfBirth
,它是DateTime
。 但现在当我用SqlBulkCopy
复制它是抛出一个exception
The given value of type String from the data source cannot be converted to type datetime of the specified target column.
我已经通过Excel工作表尝试了各种date格式,但是错误是一样的。