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

Export to Excel - Datetime Format

1 Answer 2968 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brot
Top achievements
Rank 1
Brot asked on 12 Mar 2015, 09:55 AM
Hello @all,

if i display data in the grid all looks fine, e.g. a date value: 27.01.2015 - 08:49:42
I use this code for display and formatting: 

fields: {
...
date_time: { type: "date" }

columns: [
...
{ field: "date_time", title: "Date/Time", format: "{0: dd.MM.yyyy - HH:mm:ss}", width: "160px" }

But when i press "Export to Excel" the datetime value is display as: "27.01.2015". If i double click into a datetime cell then the value is display correctly as "27.01.2015  08:49:42". 
How can i change this that the hole datetime value will be displayed from the beginning?

Thx

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 16 Mar 2015, 08:41 AM
Hi Brot,

You can set custom cell format as shown in following example: 
Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Brot
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or