Loading

Date values appear corrupt in a Report Export to Excel Due to Locale

Date de publication: Oct 7, 2024
Description
When working within an Excel file that was exported via report in Salesforce, you may find that changing the cell format to Date for cells containing date values returns inaccurate information.

This happens when the locale settings of your Excel platform, which are controlled by the locale settings in your computer, is different from the locale settings defined in your Salesforce Interface.
 
For example, if you are using American date format (MM/DD/YYYY) in the computer, Excel would identify dates that look like 11/30/2012.

If your Locale in Salesforce is set to something that uses the DD/MM/YYYY format, you would have 30/11/2012.

When you export such a date to Excel and it has anything more than 12 in the first part of the date (the Month section),  Excel  will not recognize it as a Date and chooses the "General" format instead.

For example, if Excel's locale is US, the following date is invalid: 30/11/2012. This is because the first part of the date represents the Month, and 30 is not a valid number.
 
Note: There are two download options, Formatted or Details only.  For more information see the Salesforce Help.
Résolution
To resolve this issue, you would need to either change your locale settings in Salesforce or in your computer.
 

A. To change your Salesforce locale settings:
 

1. Access your personal information:
 
  • In Classic: Click Setup | My Personal Information | Personal Information | click Edit
  • In Lightning: Click your user image | Settings | Language & Time Zone

2. On the Locale Settings section, click on the Locale picklist and select the same locale as what your computer is set to.
3. Click Save.
Ressources supplémentaires

Review alternate solutions, vote, and comment on the Idea for Date field in a report is formatted in Excel as 'General' when exported LEX.

Trailhead - Learn about Regional Settings

Enable ICU Locale Formats (Release Update)

 

Numéro d’article de la base de connaissances

000385810

 
Chargement
Salesforce Help | Article