Hi
I'd like to fix an issue we have about the columns using dates, we have a dashboard and when user export the dash to Excel.
seems like there's no problem or something, however when we proceed to open the Excel file.
if we take a look to those columns displaying dates, then we select any of these cells, right click, "format cell"
Catogory is displayed as "General", instead of date and any of the possible types-formats
so when user is trying to apply filter in excel, values for date columns are not recognized as dates.
I have been trying to modify the date format like these
//attempt3
//attempt4
//pcagatecurrentdate requestHeaderView.pcagatecurrentdate ? new SimpleDateFormat("MM-dd-yy HH:mm:ss zzz").format(requestHeaderView.pcagatecurrentdate) : null
//attempt5
//pcagatecurrentdate requestHeaderView.pcagatecurrentdate ? new SimpleDateFormat("MM-dd-yy 07:00:00").format(requestHeaderView.pcagatecurrentdate) : null
//attempt6
//pcagatecurrentdate requestHeaderView.pcagatecurrentdate ? new SimpleDateFormat("MM-dd-yy 19:00:00").format(requestHeaderView.pcagatecurrentdate) : null
//attempt7
//pcagatecurrentdate requestHeaderView.pcagatecurrentdate ? new SimpleDateFormat("MM-dd-yy'T'HH:mm:ss.SSSZ").format(requestHeaderView.pcagatecurrentdate) : null
//attempt8
//pcagatecurrentdate requestHeaderView.pcagatecurrentdate ? new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(requestHeaderView.pcagatecurrentdate) : null
//attempt9
//pcagatecurrentdate requestHeaderView.pcagatecurrentdate ? new SimpleDateFormat("MM-dd-yyyy'T'HH:mm:ss.SSSZ").format(requestHeaderView.pcagatecurrentdate) : null
this is how it looks like in the front end,
<kendo-grid-column
field="pcagatecurrentdate"
[columnMenu]="true"
title="{{ getTitle('pcagatecurrentdate') }}"
tooltip=""
[locked]="false"
width="110"
>
<ng-template
kendoGridFilterMenuTemplate
let-filter
let-column="column"
let-filterService="filterService"
>
<app-date-range-filter
[field]="column.field"
[filter]="filter"
[filterService]="filterService"
>
</app-date-range-filter>
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem>
<span
[ngClass]="{
okProjectStatus:
dataItem.projectConceptApprovedStatus ==
'ok',
warningProjectStatus:
dataItem.projectConceptApprovedStatus ==
'warning',
dangerProjectStatus:
dataItem.projectConceptApprovedStatus ==
'danger'
}"
>
{{
dataItem.pcagatecurrentdate != null
? (dataItem.pcagatecurrentdate
| date : 'dd-MMM-yyyy')
: ''
}}
</span>
</ng-template>
</kendo-grid-column>
but at the end all the dates still displayed as "General"
and this is the target I would like to reach
I appreciate any suggestions you may have
Thanks
Victor M.