title: How to prevent format change of date in view after save in ASP MVC
body: <p>After saving <code>DateTime</code> in controller, I pass it back to the <code>View</code> but when it's displayed in view the value became <code>/Date(1545062400000)/</code>.</p>
  
  <p>I already checked in the controller while in process if the data was changed but it did not since I'm just passing the <code>viewmodel</code> in the <code>view</code>.</p>
  
  <pre><code>[HttpPost]
      public ActionResult UpdateHeader(RecordViewModel recordViewModel)
      {
          var ResultMessage = "";
          if (ModelState.IsValid)
          {
              Record record = (from c in context.Records
                                             where c.RecordId == recordViewModel.RecordId
                                             select c).FirstOrDefault();
              if (record == null)
              {
                  return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
              }
              record.Description = recordViewModel.Description;
              record.Date = recordViewModel.Date;
              record.Remarks = recordViewModel.Remarks;
              try
              {
                  context.SaveChanges();
                  ResultMessage = "Record successfully updated.";
              }
              catch (Exception ex)
              {
                  ModelState.AddModelError("", ErrorHelper.GetInnerException(ex));
                  ResultMessage = "Error: " + ErrorHelper.GetInnerException(ex);
              }
          }
          var result = new { Model = recordViewModel, ResultMessage = ResultMessage };
          return Json(result, JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p><strong>Angular</strong></p>
  
  <pre><code>self.submitEdit = function () {
          var updateRecordHeader = RecordServices.updateRecordHeader(self.header)
          .then(function successCallback(response) {
              self.header = response.data.Model;
              self.header.ResultMessage = response.data.ResultMessage;
          }, function errorCallback(response) { toastr.error(response.statusText); });
      }
  </code></pre>