igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Why does excel not format time portion of date?

Open Eralmidia opened this issue 2 years ago • 1 comments

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:

image

The data are date objects, the type of the column is date, and the filter recognizes it as a date: image

However, when we export this to excel, it looks like this: image

The time component is there, but the format chosen by excel was

image

Note: we have our own toolbar for the grid, and our current export code looks like this: image

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

Eralmidia avatar Jun 08 '22 06:06 Eralmidia

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Aug 08 '22 00:08 github-actions[bot]

@ChronosSF This seems to have been falsely closed by the bot?

Eralmidia avatar Aug 26 '22 05:08 Eralmidia