SSRS - Formatting DateTime
Posted on 2008-11-12
I am using SQL Server 2005 Reporting Services and need to format dates. I want the dates in short date format (example: 05/31/2008). I can do this by using the format property of a field and using an expression such as the following:
This renders properly in my report and I have no issues. However, in both of these cases when I export to Excel, I get the error " File Error. Some number formats may have been lost.". What happens when the Excel file opens is that the dates are now in numeric format (example: 39753). I believe this is the number of seconds since a certain point in time. If I change the cell format, I can convert the number into a date just fine, however, when the end -users run the reports and export to Excel, I don't want them to have errors and have that extra step each time.
If anyone has any ideas, they would be greatly appreciated. Please let me know if you need any additional information.