Can any one help me to convert date formate MMDDYYYY to YYYYMMDD.
Actually I'm running SSIS (ETL) package. I got source file from client, in that source file one column called "Date Status" wit MMDDYYYY format. But I want to convert that format to YYYYMMDD and import into staging table.
I suggest you conver the field into datatime value format. So later you can choose any presentation format you prefer in your application. And since SQL Server 2008, you can use data type date which takes only 3 bytes, compared with 8 bytes if you save the value in char. And when you save the value in datetime, you can use lot of native functions for datetime date type, like DATEDIFF, DATEADD etc. And you can also use functions like SWITCHOFFSET to change the universal time to local time easily. For some other practices, use a 4 bytes integer in YYYYMMDD format and provide a date dimension tables is also acceptable.