title: LINQ TO SQL, Dynamic query with DATE type fields
body: <p>I'm building a query with the LINQ dynamic library so I don't know how many potential parameters will I have and I get an error when trying to query DATE type fields:</p>
  
  <p><strong>Operator '>=' incompatible with operand types 'DateTime' and 'String'</strong></p>
  
  <p>When I step through the debugger in the Dynamic.cs it shows that the value is of type string and the field is of type date so the problem is obvious but I have no idea how to approach it.</p>
  
  <p>Any ideas?</p>
  
  <p>BR</p>
  
  <p>Code:</p>
  
  <pre><code>using (MyEntities db = new MyEntities())
  {
  String SQLparam = "CreateDate &gt;= \"" + DateTime.Now.ToShortDateString() + "\"";
  List&lt;UserList&gt; UserList = db.UserList.Where(SQLparam).ToList();
  }
  </code></pre>