title: ASP Classic, getting just the data from datetime from a database query
body: <p>Ive looked around Google and can't find any working code. I want to query my database to return just results from a certain date. But the datetime column in my database has both the Date and the Time. </p>
  
  <p>How would I go about doing this. </p>
  
  <p>today = 15/08/2013</p>
  
  <p>An example of one of the database values = 15/08/2013 02:13:18 PM</p>
  
  <p>And here is my code at the moment</p>
  
  <pre><code>'Connect to database
  set conn=Server.CreateObject("ADODB.Connection")
  conn.Provider="Microsoft.ACE.OLEDB.12.0"
  conn.Open Server.MapPath("/nightclub_photography/data/database/jamsnaps.mdb")
  
  'Get the current date
  today = Request.Cookies("sdate")
  response.write today
  
  sql = "SELECT * FROM sales WHERE saleDate =" &amp; today
  
  Set rs = conn.Execute(sql)
  
  if rs.EOF then
      response.write "Error!"
  end if
  </code></pre>