Time format does not work when List View is exported to excel
The requirement is to show date and time in different columns. User has used two different columns - Date and time control to display respecive fields.
It works fine from front end, but during exporting to excel in time field it shows one date "1/0/1900".
No error message, but in front of time field one date is displayed - "1/0/1900"
Steps to Reproduce
1.Create one list view.
2. Use one date time property in two columns. in Format and Format to excel use date and time control. It works for UI but does not work for export to excel.
The issue is the OOTB Time format does not work when we are trying to perform the export to excel of the list view, and it only show case the correct reslut on the UI of PRPC .
1. Open the "Time" HTML Property rule instance on your system.
2. Perform a "Save As" of the HTML Property, specifying a new "Stream Name" and custom Ruleset and Ruleset version.
3. Update the new HTML property to add the code below as illustrated in the example screenshot.
(In the below div tag the style must be the format which you want to export to excel.)
<div class="excel-datetime" style="vnd.ms-excel.numberformat:@">
4. Use this New Control in the Export to Excel format.
5. Save the rule and execute the report and let me know if you have any issues.
0% found this useful