excel import / date format | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

excel import / date format

Hi all
Got a stupid problem with the import of a date column from a excel-file to my sql-server.
The date (Month and Day) gets switched when possible. here some examples:
  • 22.02.2010 -> 22.02.2010 (gets imported correct)
  • 12.02.2010 -> 02.12.2010 (dd and mm are mixed up after import)
I have a dataflow task: Excel-Source -> Dataconverter -> SQL-Server-Target
The Preview of the Excel shows the correct date. But the Preview of the SQL-Target shows already the wrong dates.
How can I fix this problem?
Any help appreciated. Thx.
Greetings Reto

Me again
I figured it out. After I have added a derived column task, where I convert the DT_DATE to DT_DBTIMESTAMP it gets imported correctly.
Cheers Reto

Good job and appreciate your feedback here again, not all enthusiastic learners like you do that… keep it up. BOL is best friend.


Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |