title: Error: No overload for method "ToString" takes 1 arguments
body: <p>I am trying to format date in a specific order</p>
  
  <pre><code>Time = DateTime.Parse(p.Time.ToString("dd-MM-yyyy HH:mm:ss"))
  </code></pre>
  
  <p>Data type of <code>Time</code> is <code>DateTime</code></p>
  
  <p>But i am getting this error:</p>
  
  <blockquote>
    <p>No overload for method "ToString" takes 1 arguments.</p>
  </blockquote>
  
  <p>p is the object of the table from which i am getting Time.</p>
  
  <pre><code>  List&lt;ProductImageMapWrapper&gt; lstpm = new List&lt;ProductImageMapWrapper&gt;();
    lstpm = _db.ProductImageMaps.Where(i =&gt; i.ClientId == null &amp;&amp; i.BrandId == null).Select(p =&gt; new ProductImageMapWrapper
    {
    Time= // Problem here
    }
  </code></pre>
  
  <p>Now, I tried using it this way</p>
  
  <pre><code>Time = DateTime.Parse(string.Format("{dd-MM-yyyy HH:mm:ss}", p.Time))
  </code></pre>
  
  <p>but then i got this error:</p>
  
  <blockquote>
    <p>LINQ to Entities does not recognize the method <code>System.DateTime Parse(System.String)</code> method, and this method cannot be translated into a store expression.</p>
  </blockquote>