I am trying to push leads into Salesforce and I am passing in the following value...
Requested_Appointment_DateTime__c=2021-12-14T18:27:33Z
This format appears to match the YYYY-MM-DDTHH:MM:SSZ format listed in the documentation. When I check the lead, it successfully pushed into Salesforce but the field Requested_Appointment_DateTime is still null. Any ideas?
Edit: I tried some execute anonymous tests to see if I could assign the date as shown... but it's saying invalid date/time. This matches the docs though?!
Lead l = [Select id, Requested_Appointment_DateTime__c from Lead where id='00Q3o00001AuWTOEA3'];
l.Requested_Appointment_DateTime__c = DateTime.parse('2021-12-14T18:27:33Z');
system.debug(l.Requested_Appointment_DateTime__c);
When I try to set the time to system.now() it returns something that looks like '2021-12-14 18:27:33' with no T or Z... when I try and parse that string it says invalid date. What is the correct date format??