title: Formatting date in Linq-to-Entities query causes exception
body: <p>I have Entity class with datetime filed, I want to select distinct 'mon-yyyy' format datetime filed value and populate drop down list.</p>
  
  <p>the following code giving me the error:</p>
  
  <pre><code>var env = db.Envelopes.Select(d =&gt; new
          {
              d.ReportDate.Year,
              d.ReportDate.Month,
              FormattedDate = d.ReportDate.ToString("yyyy-MMM")
          }).Select(d =&gt; d.FormattedDate)
  
      List&lt;SelectListItem&gt; _months = new List&lt;SelectListItem&gt;();         
  
      foreach (var mname in env)
      {
          _months.Add(new SelectListItem() { Text = mname, Value = mname });
      }
  </code></pre>
  
  <p><strong>Error message:</strong></p>
  
  <blockquote>
    <p>LINQ to Entities does not recognize
    the method 'System.String
    ToString(System.String)' method, and
    this method cannot be translated into
    a store expression.</p>
  </blockquote>
  
  <p>How can I correct this error message?</p>
  
  <p>Thanks
  SR</p>