title: LINQ Query to Convert string to datetime
body: <p>I want to convert the string value to date time </p>
  
  <p><strong>Class</strong></p>
  
  <pre><code>public class demoDate
  {
      public DateTime DueDate;
      public int OrderReportID;
  
      public DateTime _DueDate 
      { 
          get { return DueDate; } 
          set { DueDate = value; } 
      }
  
      public int _OrderReportID 
      { 
          get { return OrderReportID; } 
          set { OrderReportID = value;} 
      }
  }
  </code></pre>
  
  <p><strong>Query</strong> </p>
  
  <pre><code>var DateQuery = (from o in db.Order_Reports
                   select new demoDate {
                      DueDate = System.DateTime.Parse(o.ReportDueDateTime), 
                      OrderReportID = o.OrderReportID
                   }).ToList();
  </code></pre>
  
  <p>This coding shows following error </p>
  
  <p>LINQ to Entities does not recognize the method 'System.DateTime Parse(System.String)' method, and this method cannot be translated into a store expression.</p>