cancel
Showing results for 
Search instead for 
Did you mean: 

SmartTable Excel Download Date format issue

bhavya_sri3
Participant
3,160

I'm using sap.ui.comp.smarttable.SmartTable for displaying data in table. I was able to display Dates in Date format by using CustomData.

But when I'm downloading data in Excel, it is showing data in json date format

/Date(1451606400000)/

I was able to show date format by using the onBeforeExport event, by passing type as Edm.Date type. This way, I was able to display json date as Date in MM/dd/yyyy format. But my requirement is to show date as dd/MM/yyyy. I understand that I need to use inputFormat property, but I could not figureout how to pass the property as my required data. Can anyone please suggest on the format I need to use..

View Entire Topic
dipender002
Explorer
0 Kudos

Hi,

Please refer to this - https://sapui5.hana.ondemand.com/#/topic/283217d8f187401c8045723abc27e5e0

When using Date EdmType, you should use 'format' property. You could write like this - 

{ property: "Duedate", label: "Due date (islamic)", type: sap.ui.export.EdmType.Date, format: "dd/mm/yyyy" } 

It is working for me. Hope it might solve your issue too.