title: DateTime.ToString("MM/dd/yyyy") inside linq threw an error
body: <p>DateTime.ToString("MM/dd/yyyy") inside linq is throwing an error. Here is my code:</p>
  
  <pre><code>public IEnumerable&lt;EmployeeViewModel&gt; GetAllEmployees()
  {
      List&lt;EmployeeViewModel&gt; vm = (
          from a in db.Employees
          select new EmployeeViewModel
          {
              EmployeeId = a.EmployeeId,
              EmployeeName = a.EmployeeName,
              HiredDateString = a.HiredDateTime.ToString("MM/dd/yyyy"),
              HiredTimeString = a.HiredDateTime.ToString("h:mm tt"),
              Description= a.Description
              }).ToList();
      return vm;
  }
  </code></pre>
  
  <p>EDIT: HiredDateString and HiredTimeString are strings inside the ViewModel.</p>
  
  <p>For which I got following error:</p>
  
  <pre><code>&lt;Error&gt;
  &lt;Message&gt;An error has occurred.&lt;/Message&gt;
  &lt;ExceptionMessage&gt;
  LINQ to Entities does not recognize the method 'System.String ToString(System.String)' method, and this method cannot be translated into a store expression.
  &lt;/ExceptionMessage&gt;
  &lt;ExceptionType&gt;System.NotSupportedException&lt;/ExceptionType&gt;
  </code></pre>
  
  <p>If I simply use: <em>a.HiredDateTime.ToString()</em> it won't throw an error. But it gives me full DateTime string; I want to get date and time strings separately.
  Thank you so much for the help.</p>