Our model has public DateTime date { get; set; }. In our opinion, our dates are stored in the JSON date format. Then we try to keep the updates up to date
var someObject = {};
someObject.date = JSONDate;
$.post("Controller/SaveAction", someObject, callback);
and our controller has public JsonResult SaveAction(ModelType model) { ... }, but this code breaks because it cannot convert the JSON date to a C # DateTime object.
How can I convert the JSON date to what the message will control the controller to correctly read the C # DateTime object?
source
share