Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to format pxTimeCreated DateTime field in ExporttoExcel

SA-30980

Summary



The user has configured the export to excel option for work object audit details. When user export the audit details to excel, DateTime property is not exporting as expected.

For example: for the value 01/01/2016 2:36PM, it is exporting excel as 01/01/2016 14:36 PM.

Error Messages



Not Applicable


Steps to Reproduce

  1. Create HTML stream to populate data in the excel.
  2. Call OOTB pzViewExceldata activity to export the HTML stream to excel.


Root Cause



A software use or operation error :
The HTML was not prepared as expected, hence it is displaying the values in Excel wrong format. For example: for the value 01/01/2016 2:36PM, in HTML it is generated as 01/01/2016 14:36 PM.
 

Resolution

Take the Export to excel as reference, verify the behavior and make the changes accordingly to HTML preparation for work object audit details.

For ex:
Prepare css for Date and DateTime as:

<style>
.excel-datetime{vnd.ms-excel.numberformat:M/d/yyyy h:mm AM/PM}.excel-date{vnd.ms-excel.numberformat:M/d/yyyy}
</style>


<TD class='excel-date'>04-Nov-2013<div style='width:1px'></div></TD>

Published December 22, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us