Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 等价于SSIS中的转换_Sql Server_String_Date_Ssis - Fatal编程技术网

Sql server 等价于SSIS中的转换

Sql server 等价于SSIS中的转换,sql-server,string,date,ssis,Sql Server,String,Date,Ssis,我有三个专栏,如下所示: Date Manufactured Date Shipped Date Arrived 25.12.2013 01.05.2014 01.12.2014 我想将它们转换为SQL中的日期时间。我该怎么做 SELECT convert(datetime, '23.10.2016', 104) 在SSIS中?如果源组件是SQL表,最好的方法是使用包含CONVERT()函数的查询,而不是直接从表中提取 否则,您的下一个最佳选择是前

我有三个专栏,如下所示:

Date Manufactured    Date Shipped    Date Arrived
    25.12.2013        01.05.2014      01.12.2014
我想将它们转换为SQL中的日期时间。我该怎么做

SELECT convert(datetime, '23.10.2016', 104)

在SSIS中?

如果源组件是SQL表,最好的方法是使用包含CONVERT()函数的查询,而不是直接从表中提取


否则,您的下一个最佳选择是前面提到的派生列组件。

您可以尝试使用派生列代码:

(DT_DBTIMESTAMP)(SUBSTRING(datestr,FINDSTRING(datestr,".",2) + 1,4) + "-" + 
 SUBSTRING(datestr,FINDSTRING(datestr,".",1) + 1,FINDSTRING(datestr,".",2) - 
                                                 FINDSTRING(datestr,".",1) - 1) + "-" +
 SUBSTRING(datestr,1,FINDSTRING(datestr,".",1) - 1))

签出
派生列任务
。另一个选项是
脚本组件任务