I'm sorry if this has been raised before. I have searched but have not found what I'm looking for.
I have a range of some 40 tab delimited txt files to load into a SQL Server 2008R2 database. These range in size from 2k to 14GB. Dates in these files are in the DDMMYY, DDMMYYYY, DD/MM/YY, DD/MM/YYYY (or YYYYMMDD being imported as varchar) format. Some columns can have a mixture of 2 and 4 digit years.
The box on which SQL Server has been installed is for some unknown reason set to US (I'm in the UK, the box is in the UK, the data is all UK data and we are a UK organisation). I cannot change this on this pre production environment. I believe that the live environment is correct. SQL Server, the users etc, I have changed to the correct UK settings.
All the receiving tables have been created with the correct data types set. Dates have been set to datetime.
When using SSIS to import the data (I can only use SSIS for operational reasons), the dates are incorrectly imported. Originally I thought converting to a US date format but further investigation shows many inconsistencies.
If I bring the date data in as say varchar and then validate using the isdate function SQL Server returns 1 as a valid date. If I alter the table and add a date (not datetime) column and update the new column the dates are converted correctly. If it's a datetime column the data is incorrect although not as inconsistent as via SSIS.
So (finally) my questions are as follows:-
Why can't SSIS correctly convert the dates to the UK date format? Why does it think it needs to convert it to US or derrivative thereof?
How can I get SSIS to import the data correctly or am I going to have to use the subsequent update method described above.
Sorry for the length of the post. This has been giving much grief for some time now.