I have been stuck in a problem actually i am trying to covert a datetime format in salesforce date time field format
The datetime format which i am getting is 2020-09-13 10:37 CDT
I tried removing CDT from the end like this but it is not working
String startDate = String.valueOf(assetActivity.get('actstart')
.getValue()).removeEnd('CDT');
Datetime dt = datetime.parse(startDate);
system.debug('dt'+dt);
ts.Start_Time__c = dt;
It is always throwing error of invalid date/time please help me out Thanks in advance