Support Article
Time Format changed after export to excel
SA-31645
Summary
Controls are used to display time in required format for a column in report definition and this report is sourced dynamically for a repeat grid.
On UI, the user is able to see date in correct desired format. But when they do an export to excel, it is getting changed into PEGA timestamp / GMT format.
Error Messages
Not applicable
Steps to Reproduce
- Configure a section with report grid having report definition as the source.
- A button is configured to perform export to excel activity
Click on export to excel and time format is changed.
Root Cause
For export to excel (custom button), users are using a data page (sourced with the same report definition). In clipboard the value of the date is stored as GMT format thus displaying as-is in downloaded excel.
Resolution
Perform the following local-change:
- In the Data page used, added an activity under the Post load Processing space.
- In the activity, converted the DateTime from the data page to the desired format using the function @DateTime.FormatDateTime(<your property>,"MM/dd/YYYY",GMT,"").
Published December 24, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.