Date format problem using SSIS for Excel into SQL Server -


I am trying to import a column of date from a spreadsheet in SQL Server 2005 using SSIS in Excel 2003 I am I am in the UK so I want to format the dates as dd / MM / yyyy.

Unfortunately, the spread of Excel 'date' formatting with a mix of dates stored in the form of wires in DD / MM / YAY (Excel with 'normal' formatting) in the spreadsheet DD / MM / Yyyy (with location 'English (United Kingdom)')

This is just this way and I can not expect that this user will be able to sort himself.

When looking at the spreadsheet, all the dates are visually visible correctly, ie DD / MM / yay

I am trying to import the value into a Holding table in the database in the valcard column. Then I run a stored procedure that copies these values ​​to the appropriate table, which contains a datetime column.

The problem is that the dates are stored in the spreadsheet and the date formatting used in MM / DD / Yyyy in the form of SQL Server and the date stored in the form of DD / MM / YYYY. going. I have the IMEX = 1 in the connection string.

Since the date of using both formats in the same varchar column, I am trying to put in a data time column, so

  SET DATEFORMAT MDY; Set desaturat  

No use.

Does anybody know that the SSIS package will appear in the Excel spreadsheet, why would the correct date import into MS SQL Server as MS / DD / Yay?

Is there no way to force the SDIS package to import the dates in the form of DD / MM / YYYY, which works with date formatting as strings and cells with the combination of dates Will?

Any other thoughts ?!

Many thanks,

Anthony

I think That you answered your question. Import of date formatted cells is considered as stars and others are considered as strings. Maybe you are the date of the SQL server date MM / dd / yyyy and therefore the conversion.

Why do not you try to add a data conversion step in the SSIS package, and convert each format into a format in a column - day by day or string then I'm sure the SQL server is all about them Will handle the same way.

Raj


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -