简体   繁体   English

将 excel 表导出到 ssis 中的数据库时遇到问题

[英]Getting trouble while exporting excel sheet to database in ssis

In excel sheet, one column contains string and date format.在 excel 表中,一列包含字符串和日期格式。 While creating ssis package to export excel to database, dates in excel sheets are not appear in database.在创建 ssis package 以将 excel 导出到数据库时,ZBF57C906FA7D2BB856D07372E41 表中的日期不会出现在数据库中。 I used data conversation in package.我在 package 中使用了数据对话。 But still not getting dates records.但仍然没有得到日期记录。 I am new to ssis.我是 ssis 的新手。 Please help me in this请帮助我

To get an exported date to display as a date/time in Excel - it needs to be in a specific format.要让导出的日期在 Excel 中显示为日期/时间 - 它需要采用特定格式。 If Excel can interpret the value as a date/time, it will sometimes just display the time portion.如果 Excel 可以将该值解释为日期/时间,它有时只会显示时间部分。

The first thing to try is cast/convert the column to a smalldatetime.首先要尝试将列转换/转换为 smalldatetime。 This drops the milliseconds from the time and that should be enough for Excel to display the column appropriately.这会减少时间的毫秒数,这足以让 Excel 正确显示该列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM