title: How to compare dates (stored as strings) with linq to entities?
body: <p>I am trying to pull data from a database by begin/end date parameters.</p>
  
  <p>However the date that I need to filter on is stored as a string in Oracle DB.</p>
  
  <p>Using linq how can I filter the dates out based on my parameters (which will be in a DateTime type)?</p>
  
  <p>I originally tried:</p>
  
  <pre><code>var test = context.MY_TABLE
    .Include(x =&gt; x.MY_DETAILS)
    .Where(x =&gt; startDate &gt;= MyHelpers.ConvertDate(x.DATE_FIELD) &amp;&amp; 
                  endDate &lt;= MyHelpers.ConvertDate(x.DATE_FIELD))
    .ToList();
  </code></pre>
  
  <p>I understand the error because linq can't generate the necessary sql statements from my method.</p>
  
  <p>So how can I compare the dates with linq that are stored in the DB as a string?</p>
  
  <p>To boot I won't know how the date will be stored in the string.  <br>For the time being I will assume '3/10/2016 12:30:00' will be the date string.</p>