Support Article
Unable to format pxTimeCreated DateTime field in ExporttoExcel
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
- Create HTML stream to populate data in the excel.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.