We've now got some dates being stored in datetime2 and date formats in SQL which works great for SQL Server. However, if you import in a table from SQL to Excel 2010, for instance, it doesn't seem to understand the new date formats (even though this is Office 2010 dealing with SQL Server 2008). So Excel pulls the values in as text values rather than date values.
Other than using CAST/CONVERT on SQL before pulling into Excel, does anyone have any other suggestions for automatically dealing with these? Right now, I'm seeing that I can do this:
Within the query pulling the data from SQL Server to Excel.
Thanks for any thoughts. Just thought I'd ask in case someone else had run into this already, and had a better way.
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
Other than using CAST/CONVERT on SQL before pulling into Excel, does anyone have any other suggestions for automatically dealing with these? Right now, I'm seeing that I can do this:
SQL:
SELECT CAST(MyDateField AS datetime) AS MyDateField
FROM MyTable
Thanks for any thoughts. Just thought I'd ask in case someone else had run into this already, and had a better way.
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57