I have a dataframe of two columns namely Id and datetimehelp (Holds time stamp value).
Given below is the view of the data in the dataframe labelled account_update_subset
Id,datetimehelp
123,18/05/18 9:50
567,18/05/18 9:45
I am writing the below Python code to have this update to a Salesforce object (Account) but it throws me an error Response content: {'exceptionCode': 'InvalidBatch', 'exceptionMessage': 'Records not processed'}
if len(account_update_subset) > 0:
key_update_attributes_list = []
update_attributes_list = []
for i in range(len(account_update_subset)):
update_attributes_data = {'Id': account_update_subset['Id'].iloc[i],
'datetimehelp': account_update_subset['datetimehelp'].iloc[i]}
update_attributes_list.append(update_attributes_data)
sf_data_cursor.bulk.Account.update(update_attributes_list)
Could anyone help me find where am I going wrong in this Python script. Thanks
dd/mm/yy hh:mm:ss
is likely not valid. This looks likesimple_salesforce
; is that right?yyyy-MM-ddTHH:mm:ss.SSSZ
format.