title: SQL display | select data from today date | current day only
body: <p>I have this query, it supposes to display data from current date (today) only</p>
  
  <pre><code>SELECT * FROM Customer WHERE visitTime &lt;= GETDATE() AND visitTime &gt; GETDATE() - 1
  </code></pre>
  
  <p>where <em>visitTime</em> is <strong>datetime</strong> type</p>
  
  <p>But it doesn't work well because I think problem is at <code>AND visitTime &gt; GETDATE() - 1</code> but I don't know how to fix this, anybody has any suggestions?</p>