This is a migrated thread and some comments may be shown as answers.

problem when export datetime string format to Excel

1 Answer 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
z
Top achievements
Rank 1
z asked on 03 Dec 2012, 05:46 AM
HI,
 I meet an problem when I Export datetime string format to Excel. I am using the "ExportFormat.ExcelML". The date type of datetime is string, when I export it to excel,it convert to False. So I think it's the problem of data type. If the type is "datetime", it will be ok.
 So how should I handle this problem, export the datetime string to excel?
 Thanks for your help in advance.

http://www.telerik.com/ClientsFiles/406612_data-in-grid.jpg
http://www.telerik.com/ClientsFiles/406613_export-excel.jpg

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 Dec 2012, 07:31 AM
Hello,

 I'm not sure how the DateTime can be converted to boolean (I've never seen such behavior before) however if you have any formatting for this DateTime (DataFormatString for the column, StringFormat for the Binding, IValueConverter, etc.) you will get string data in your excel output. 

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
General Discussions
Asked by
z
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or