title: getting error cannot apply operator to operands of type system.datetime and string
body: <p>I am using Linq query but getting error
  <code>Cannot apply operator &gt;= to operands of type system.datetime and string</code></p>
  
  <p>here is my linq query</p>
  
  <pre><code> var myBirthDate= BirthDate.ToString("yyyy-MM-dd HH':'mm':'ss");
  
   var myList= (from myEntity in myEntityRepository.AsQueryable()
                                   where
                                       myEntity.id== Id &amp;&amp;
                                       myEntity.birthdate &gt;= myBirthDate
                                   select myEntity).Take(1);
  </code></pre>
  
  <p>I convert date to to  <code>yyyy-MM-dd HH':'mm':'ss</code> format because i get in other format from client.</p>
  
  <p>How can i avoid this error?</p>