igniteui-angular
igniteui-angular copied to clipboard
Why does excel not format time portion of date?
Question
This question is related to dates in grids and the excel exporter. We used to simply keep our dates as iso8601 strings and format them with a pipe in the cell template. But as we are now starting to utilize the Excel style filter in the grid, it is beneficial to convert the strings to actual date object in the underlying data, in order to get the correct filtering options (this week, last month etc).
Another issue we had before converting to date, is that Excel in fact doesn't seem to recognize the iso8601 standard as a date, resulting in Excel treating it as plain text. Converting to date and using the Igx Excel exporter do result in dates, but for some reason it chooses a format which only shows the date and not time component. For instance, we have the following grid:
The data are date objects, the type of the column is date, and the filter recognizes it as a date:
However, when we export this to excel, it looks like this:
The time component is there, but the format chosen by excel was
Note: we have our own toolbar for the grid, and our current export code looks like this:
Is there anything which can be done about this? Its quite cumbersome for our customers to manually have to change the formatting of every date coulmn for every export.
- igniteui-angular version: 12.3
- browser: Chrome latest
There has been no recent activity and this issue has been marked inactive.
@ChronosSF This seems to have been falsely closed by the bot?