Loading

Format the 'Date' and 'Date Time' data in a CSV file For Salesforce Data Loader

Udgivelsesdato: Jun 20, 2024
Beskrivelse

Data Loader uses the SOAP API or BULK API depending on how it's configured.

Unless formatted properly for the API to accept them, users may have trouble importing changes to the 'Date,' 'Date Time,' and 'Time' data type fields when the corresponding values in the .csv file do not adhere to a specific formatting or correspond with the org's time zone settings.

Refer to Data Types Supported by Data Loader for all of the supported formats that are unique to Data Loader.
 

Løsning

Watch this quick video on how to export to CSV using the Data Loader with date and time fields.




Here is the correct formatting to use when there is a date or time field to avoid errors and frustration:

'Date' field acceptable formats

  • YYYY-MM-DD

  • YYYY-MM-DD hh:mm:ss

  • YYYY-MM-DD hh:mm:ss

  • YYYY-MM-DDThh:mm:ssZ

  • YYYY-MM-DDThh:mm:ss.sssZ

 

'Date Time' field acceptable formats

  • YYYY-MM-DD hh:mm:ss

  • YYYY-MM-DDThh:mm:ssZ

  • YYYY-MM-DDThh:mm:ss.sssZ

 

'Time' field acceptable formats

  • hh:mm:ss.sssZ (For example, 07:00:00.000Z)


 

Example scenarios

Scenario: If your org's time zone is set as "China/Taiwan time zone GMT+8":

 'Date' and Data Loader time zone is GMT+0, GMT, or blank 

Your example data in your import spreadsheet can be one of the following:

 

  • 2011-01-10

  • 2011-01-10 00:00:00

  • 2011-01-10T00:00:00Z

  • 2011-01-10T00:00:00.000Z



'Date' and Data Loader time zone is GMT+8

Your example data in your import spreadsheet must be one of these:

  • 2011-01-10 08:00:00

  • 2011-01-10T08:00:00Z

  • 2011-01-10T08:00:00.000Z


Note: If you set the hh:mm:ss to 00:00:00, the Import Date data in Salesforce will display the previous day ('2011-01-09' instead of '2011-01-10').


'Date Time' and Data Loader time zone is GMT+8

Your example data in your import spreadsheet must be one of these options in order to have the 'Date Time' display exactly what you imported in spreadsheet:

  • 2011-01-10 XX:XX:XX

  • 2011-01-10TXX:XX:XXZ

  • 2011-01-10TXX:XX:XX.XXXZ

 

Additional information about these format​s

  • XX:XX:XX or XX:XX:XX.XXXZ stands for the variable time you key in.

  • The "T" in these strings above indicates the beginning of the time element.

  • "Z" is a special GMT designation.

  • This information is only applicable for the latest version of the Data Loader



Vidensartikelnummer

000385167

 
Indlæser
Salesforce Help | Article