I have a @restResource
that's receiving a JSON payload as a string. I am taking that payload and placing it into a Map<String, Object>
variable. I'm trying to save the date/time into a variable that I can later pass to Salesforce.
String raw_start_date = (String)response.get('start_date');
Datetime start_date = Datetime.parse(raw_start_date);
I keep getting the following error when I receive my test packet:
FATAL_ERROR System.TypeException: Invalid date/time: 2020-01-15T00:00:00Z
What am I missing here? I'm I using the wrong command to get the data saved into a Datetime
variable?