While exporting data to excel sheet date appears with time
Whenever the list view is run, date with dd-MM-yyyy format appears for Date column on screen, but when the data is exported to excel, for few cases time is appended along with date, but only dd-MM-yyyy values are required not time.
Steps to Reproduce
1.Run the list view.
2. Click 'Export to Excel' button.
3. Check the date column in generated excel.
This issue is resolved through the following local-change:
When performing an export to excel the default presentation of the date is m/d/yyyy HH:mm, it is possible to override this when exporting to excel and specify an alternative format.
The steps below illustrate how to implement a revised format for the datetime using export to Excel and in this example the Date-Time-Short format (dd/mm/yyyy) is used.
1.Open the “Export_DateTime” 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.
In this instance the “Stream Name” is reported as “Export_DateTime_Custom” in the custom ruleset and ruleset version.
3.Update the new HTML property to add the code below as illustrated in the example screenshot:
<div class="excel-datetime" style="vnd.ms-excel.numberformat:dd/mm/yyyy ">
After implementing the update the new HTML property HTML Source is as follows:
4.Open the ListView rule that you require to update and add the new custom html property in the column Export Html Property for the corresponding date time property field.
5.Save the rules, execute the list view and perform an Export to Excel.
6.Review the format of the export.
50% found this useful