function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
yuliayulia 

Export date field from CSV to salesforce with apex Data loader

Hi All,

i want to ask about export date field from CSV to salesforce with apex Data Loader. 

 

when we export date datatype using data loader, results on apex explorer(salesforce) always -1 day. I'm using windows 7

 

For example : date (csv) : 15/10/2010. After export to salesforce --> date = 16/10/2010.

 

 

Yulia 

Best Answer chosen by Admin (Salesforce Developers) 
hisrinuhisrinu

From Help:

 

When loading data into date fields such as Opportunity Close Date using the Data Loader, the date displayed in the application is sometimes one day earlier than the date in the file.

 

The reason for this is that fields such as Close Date are actually date/time fields.  When a date is loaded without specifying the time, the time is defaulted to 00:00 - midnight.  When another user is in a time zone which is behind the current user's time zone, the date will show on the previous day.  For example:

 

20 August 2008 00:00 in Paris is 19 August 2008 23:00 in London

 

Similar issues can arise when daylight savings time begins or ends.

 

Two simple solutions to this are:

1) Specify a time as well as a date when loading dates using the Data Loader.

or

2) Switch your PC's time zone to Hawaiian time before starting up the Data Loader.

All Answers

hisrinuhisrinu

From Help:

 

When loading data into date fields such as Opportunity Close Date using the Data Loader, the date displayed in the application is sometimes one day earlier than the date in the file.

 

The reason for this is that fields such as Close Date are actually date/time fields.  When a date is loaded without specifying the time, the time is defaulted to 00:00 - midnight.  When another user is in a time zone which is behind the current user's time zone, the date will show on the previous day.  For example:

 

20 August 2008 00:00 in Paris is 19 August 2008 23:00 in London

 

Similar issues can arise when daylight savings time begins or ends.

 

Two simple solutions to this are:

1) Specify a time as well as a date when loading dates using the Data Loader.

or

2) Switch your PC's time zone to Hawaiian time before starting up the Data Loader.

This was selected as the best answer
ArrgHunterArrgHunter

hi,

 

in your Apex Data Loader setting , change timezone to GMT for UK or yur local timezone. this will resolve the date issue.

 

cheers