Print this page

"Date" and "Date Time" format in Data Loader and API

Knowledge Article Number 000004680
Description

Data Loader leverages 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" and "Date Time" Data Type fields when the corresponding values in the CSV file do not have a specific formatting or correspond with the org's time zone settings.

Here's the correct formatting to use so you can avoid errors and frustration:

Resolution

 

"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

 

 

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 either:
 
  • 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 either:
  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 either one of the below 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.XXX stands for the variable time you key in.
  • The "T" in these strings 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


 
Additional help resources
 




promote demote