Date Time Format changes while exporting to excel using pxGenerateExcelFile.

Problem :

When you try to export the reports / page list results by using pxGenerateExcelFile there is a high chance of date time property format changes even if you specify that in your excel binary file template.

Faced issue while exporting to excel in date time format, like wanted to have the date time value in 12 hour format and tried to set the same for that particular column in excel template but it is getting overriden all the time when you export.

Solution :

Before calling pxGenerateExcelFile, try to set paramters as mentioned below.

Param.EXCEL_DATE_TIME_FORMAT = MM/dd/yyyy hh:mm:ss a - To have the time in 12 Hour format give ’ a ’ , else don’t give it.

Param.EXCEL_DATE_FORMAT = MM/dd/yyyy

Noticed some change in the values after export if month is given in small (mm) and then tried with capitals (MM). If you also face this kind of issue, try to play around with this format.

So, set all your paramters before calling pxGenerateExcelFile and check pass current paramter page while calling.

Thanks.