title: How to write LINQ to SQL query for getting today date records?
body: <p>I want to get the today entered records using LINQ to SQL. I wrote the below code but it is returning previous date records also.</p>
  
  <pre><code>DateTime todaysDate = DateTime.Now;
  DateTime yesterdaysDate = DateTime.Now.AddDays(-1);
  
  var result = (from a in cxt.visitor.OrderByDescending(n =&gt; n.singin)
                where (a.singin &gt; yesterdaysDate &amp;&amp; a.singin &lt;= todaysDate)
                select new {a.visitorid, a.visitorname, a.visitingperson, a.phonenumber, a.reasonforvisit, a.signature, a.singin });
  </code></pre>
  
  <p>Can you please tell me how to get the today entered records only using LINQ to SQL?</p>