title: ASP.NET MVC 5 using DateTime
body: <p>I am working on a project for an Event application. My task is to create a partial view and show any events that are within the next two days. </p>
  
  <p>I am getting an error:</p>
  
  <blockquote>
    <p>Operator &lt;= cannot be applied to operands of type string and DateTime</p>
  </blockquote>
  
  <p>I am unsure how to fix this issue. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>public ActionResult GetLastMinuteDeals()
  {
      DateTime futureDate = DateTime.Today.AddDays(2);
  
      var LastMinuteDeal = db.Events
                             .Where(a =&gt; a.EventStartDate &lt;= DateTime.Today)
                             .Where(a =&gt; a.EventStartDate &lt;= futureDate);
      return LastMinuteDeal;
  }
  </code></pre>