Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a datagrid that pulls data from MS SQL 2008 server. The Date column appears in correct format on the UI. But on export to excel, the date column format changes to double. Eg. 4/3/2014 gets converted to something like 40256.847.Is it because of some System settings? Or do I need to change the code.
Posted
Updated 3-May-15 7:40am
v2
Comments
We have to check the code. Have you converted the value to DateTime while exporting?
Michael_Davies 3-May-15 14:01pm    
Do you format the Excel Sheet column or cell as date? Cells default to number...you are seeing the date represented as a number.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900