You need to sign in to do that
Don't have an account?
Sheed
Conversion of String to DateTime format in Salesforce
I need to convert a string that I am getting from JSON response (For eg: 2018-05-29T22:57:11.000-07:00) to DateTime (eg:2014-03-29 06:09:36)
what should i do?
what should i do?
Please try the below code and let us know if it works :
String dateString = '2018-05-29T22:57:11.000-07:00';
DateTime resultDateTime = DateTime.ValueofGmt(dateString.replace('T', ' '));
Thanks,
Shravan