Loading

Format 'Date' and 'Date Time' fields for import with the Data Import Wizard

Udgivelsesdato: Aug 20, 2023
Beskrivelse

When importing records using the Salesforce Data Import Wizard, the import may fail if Date or Date/Time field values in the CSV file are not formatted to match the locale of the user running the import. This error typically appears in the import results:

INVALID_FIELD:Failed to deserialize field at col 0. Due to, '<Date/TimeValueFromFileHere>' is not a valid value for the type xsd:dateTime:<Date_Time_Field_Here__c> --

The Data Import Wizard uses the BULK API internally, which requires Date and Date/Time values to follow a specific format based on the importing user's locale settings in Salesforce.

Løsning

How to Fix Date and Date/Time Format Errors in the Data Import Wizard

To resolve the import error, set the Date and Date/Time field values in your CSV file to match the format that corresponds to the locale of the user running the import.


Step 1: Check the importing user's locale

  1. In Salesforce, navigate to Setup.
  2. In the Quick Find box, type Users, then select Users.
  3. Click the name of the user who will run the import.
  4. Note the Locale value shown on the user detail page.

To change the locale, click Edit, update the Locale field, and click Save. See Edit Your Language and Locale Settings for full instructions.

Step 2: Format your Date and Date/Time values correctly
Date and Date/Time values in the CSV must match one of the following formats:

 

 

Note

  • For a Date field: include only the date portion (not time).
  • For a Date/Time field: include both date and time portions.
Vidensartikelnummer

000383432

 
Indlæser
Salesforce Help | Article