Operator >= cannot be applied to operands of type string and datetime
<p>The user enters two parameters in the url which are the start date and end date and they are entered in the format <code>yyyyMMddhhmm</code> as a string. I'm attempting to take these strings and turn them into dates so I can query my database.</p>

<pre><code>[ResponseType(typeof(Detail))]
public IHttpActionResult GetDetail(string StartDate, string EndDate)
{
    DateTime StartDateTime;
    DateTime EndDateTime;

    StartDateTime = new DateTime();
    EndDateTime = new DateTime();

    StartDateTime = DateTime.ParseExact(StartDate, "yyyyMMddhhmm", null);
    EndDateTime = DateTime.ParseExact(EndDate, "yyyyMMddhhmm", null);

    var detail = from a in db.Details where (a.callDate &gt;= StartDateTime &amp;&amp; a.callDate &lt;= EndDateTime) select a;

    var Response = new DetailResponse() { status = true, calls = detail };
    return Ok(response);
}
</code></pre>

<p>However I get the error that >= can't be used in datetime and strings.</p>

<p><strong>EDIT:</strong>
For the sake of one of the answer I'm including a model class I'm using to display the data.</p>

<p><strong>DetailResponse.cs</strong></p>

<pre><code>public class DetailResponse
{
    public bool status { get; set; }
    public string statusMessage { get; set; }
    public IQueryable&lt;Detail&gt; calls { get; set; }
}
</code></pre>