title: Getting Error on server : "String was not recognized as a valid DateTime."
body: <p>I'm go for the fetch data using by id in c# using web api angularjs. but this code it's in my locally working very well and on server getting error like this 'String was not recognized as a valid DateTime.' any one know how can fix it this is error.here below listed my method in c#.</p>
  
  <p>This is my api method :</p>
  
  <pre><code> var ProItemList = db.Promotion_ctc.Where(x =&gt; x.pid == Pro.id)
   .Select(i =&gt; new ProductItemViewModel
    {
     ItemId = i.ItemId,
      ProductId = i.ProductId,
      Qty = i.Qty,
       Rate = i.Rate,
       Date = i.Date
     })
     .ToList();
  
           ProItemList.ForEach(s =&gt;
              {
                  s.Date = Convert.ToDateTime(s.Date).ToString("MM-dd-yyyy");                    
              });
  
      var Details = new
      {
        Pro.id,
        Pro.name,
       Pro.image_url,
        ProItemList 
   };
  
    return Json(new { data = Details });            
   }
  </code></pre>
  
  <p>in my database and class Date filed datatype is string. so any one know how can resolved this issue.</p>