年日互换了SSIS和SQL Server [英] Day and Year got swapped SSIS and SQL Server

查看:149
本文介绍了年日互换了SSIS和SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SSIS和SQL Server之间遇到一个奇怪的问题。

I got strange issue between SSIS and SQL Server.

我已经开发了SSIS来读取CSV平面文件并将文件上传到SQL Server。一切都运转良好且完美。奇怪的问题是,在SSIS导入200条记录的1000条记录中,日期发生了交换,其中日期数据被交换,而日期则代替了年份和年份。

I've developed SSIS to read CSV flat files and upload the files to SQL Server. Everything is working great and perfectly. The strange issue is that out of 1000 records that SSIS is importing 200 records have an issue with date where the date data are getting swapped the day became in the place of the year and the year in place of the day.

这是完美行和有问题的行的示例

This is an example of perfect row and problematic row

完美行:

2018-12-17 09:05:00.000

问题行:

2017-12-18 09:05:00.000

任何人都面临相同的问题或知道如何解决,请协助。

Anyone faced the same issue or knows how to solve please assist.

谢谢

推荐答案

以下步骤支持我对问题:

The following steps supported me to sort out the issue:


  1. 将PC格式设置为dd-mm-yyyy hh:mm:ss

  2. 打开CSV文件,然后尝试展开出现问题的列。

  3. 关闭CSV文件并保存更改。

并运行SSIS。

希望对您有帮助

这篇关于年日互换了SSIS和SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆