How can I change the date format according to the date format of Salesforce?

58    Asked by DylanForsyth in Salesforce , Asked on Feb 20, 2024

I am currently working on a particular project in which I need to migrate data from a legacy system into Salesforce by using the data loader. The legacy system stores date in the format of YYYY-MM-DD, however, Salesforce always accepts dates in the format of YYYY-MM-DDTHH:MM:SS. How can I change the date format so that it can correctly match with Salesforce’s format? 

Answered by Deirdre Cameron

 In the context of Salesforce, you can change the date format from the legacy system into the format of Salesforce during the process of migration by using the data loader. This involves the conversion of date format from YYYY-MM-DD to YYYY-MM-DDTHH:MM:SSZ before going through with the process of inserting the data into Salesforce:-

Here Is an example given of how you can do it by using mapping functionalities of data loader:-

  1. Open the data loader and then try to log into your
  2. Then try to create a new mapping or edit an existing one.
  3. In the mapping you can select the field that represents the date from the legacy system.
  4. Create a new mapping or edit the existing one in the section of “field mapping”.
  5. Now, you can use the transformation function CINVERTTIMEZONE() to convert the date format.
  6. Now, you can save the mapping and then run the data import process.

Your Answer


Parent Categories