JsonConvert throws an error while converting string to DateTime.
I have set date formatter to fix this issue, but still the issue exists.Could not convert string to DateTime: 14-07-2019. Path 'CartDetails[0].LineItems[0].QuoteDate', line 1, position 371.
If I set the formatter I get "String was not recognized as a valid DateTime."
My JSON string has the following properties
And my object has the following properties
public DateTime QuoteDate { get; set; }
public DateTime LastUpdatedDate { get; set; }
"LastUpdatedDate": "01-01-0001"
"QuoteDate": "14-07-2019"
//var format = "dd-mm-yyyy'T'HH:mm:ssK";
//var dateTimeConverter = new IsoDateTimeConverter { DateTimeFormat = format};
//var myObj= JsonConvert.DeserializeObject<MyObject>(checkOutBody,dateTimeConverter);
var myObj= JsonConvert.DeserializeObject<MyObject>(checkOutBody);
I expect my object to be parsed successfully