+ Start a Discussion
KarthikThotaSFDCKarthikThotaSFDC 

Date Issue while Command Line interface data loasder is using.date decreasing by -1 in SF

<entry key="process.useEuropeanDates" value="true"/>
<entry key="sfdc.timeZone" value="India Standard Time (Asia/Calcutta)"/>

 

Even i included the above two points in Process-config.xml, date is decreasing by minus one when the record is inserting in Salesforce.

 

Please suggest, how to insert correct date while command line interface is using.

 

Thanks in Advance,

Karthik.

Best Answer chosen by Admin (Salesforce Developers) 
KarthikThotaSFDCKarthikThotaSFDC

Atlast i got solution,

 

For Date field :

 

if the date is 06-02-2013 we have to maintain "2013-02-06T00:00:00.00Z" in .CSV file, so that we can avoid decreasing the date by -1 while inserting in salesforce.

 

For DateTime Field:

 

we need give YYYY-MM-DDTHH:MM:SSGMT+5:30

Example: If  the date is 04-03-2013and time is 2.30Pm We have to maintain 2013-03-04T14:30:00GMT+5:30

 

 

 

All Answers

Shiv ShankarShiv Shankar

Date Format should be YYYY/MM/DD

KarthikThotaSFDCKarthikThotaSFDC
Hi, Thanks for your quick response. When i am trying to save that particular date column in YYYY/MM/DD, it was not saving in that manner. Even i have by using format cells, if i closed the csv file and opened again, it was in previous format(mm/dd/yyyy). now i got "BookingDate: invalid date: Fri Sep 09 00:00:00 GMT 180" error when i tried to import data using command line interface how to overcome..please suggest. Thanks in Advance Karthik
ShahTheTrainerShahTheTrainer

please check the timeZone in username-> setup->Personal Setup->My personal Info->Personal Info..

KarthikThotaSFDCKarthikThotaSFDC

Time Zone in personal information is :  GMT+05:30  India Standard Time Asia/Calcutta

ShahTheTrainerShahTheTrainer

Please check any TRIGGERS defined on the object which are doing field update action.

KarthikThotaSFDCKarthikThotaSFDC

No triggers on that object ..

 

 

ShahTheTrainerShahTheTrainer

Triggers in the sense may be Workflow Rule with FieldUpdate action.

 

1.   confirm whether field is Date type (or)  DateTime type.

2. Please see any Workflow rule is triggered and doing Field Update Action.

 

 

 

If NOT,

Shiv ShankarShiv Shankar

When we use data loader we gives date format in YYYY/MM/DD format, although when you will see date on your view page it will come as DD/MM/YYYY format.

Shiv ShankarShiv Shankar

Do one thing create one dummy reocrd in database, and access this record through work banch, and put time zone according to that.

KarthikThotaSFDCKarthikThotaSFDC

Hi

 

i exported data of 1 record, which contains Date and DateTime field from salesforce.

 

I got Date and time field in .csv as 2013-03-04T09:46:00.000Z but in salesforce it is 4/3/2013 3:16 PM

 

How to differente AM and PM, while importing datetime fileds data.

 

AND

 

I got Date in .csv as 3/4/2013 , and in SF it was 4/3/2013

 

but when i using command line interface , the date field decresing by 1 day.

KarthikThotaSFDCKarthikThotaSFDC

Atlast i got solution,

 

For Date field :

 

if the date is 06-02-2013 we have to maintain "2013-02-06T00:00:00.00Z" in .CSV file, so that we can avoid decreasing the date by -1 while inserting in salesforce.

 

For DateTime Field:

 

we need give YYYY-MM-DDTHH:MM:SSGMT+5:30

Example: If  the date is 04-03-2013and time is 2.30Pm We have to maintain 2013-03-04T14:30:00GMT+5:30

 

 

 

This was selected as the best answer