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

While exporting data to excel sheet date appears with time

SA-10126

Summary



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.


Resolution



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.
 
Steps:
 
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 ">
{existing code}
<div>
 

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.

 

Published June 15, 2015 - Updated October 8, 2020

Was this useful?

50% 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