title: mySQL query between two dates and two times
body: <p>I would like to query a mySQL table to pull out data between two dates and two times. I know how to do this for a single "datetime" column using the "between" call but my columns are one "date" column, and one "time" column. All the solution I can find online are for single datetime columns.</p>
  
  <p>My ranges go from "day1" at 15:30 to day1+1day at 15:14</p>
  
  <p>So far I can get the following range (which works):</p>
  
  <pre><code>SELECT time,
         close 
    FROM intraday_values 
   WHERE date="2005-03-01" 
     and time between "15:30" and "23:59"
  </code></pre>
  
  <p>But I obviously need to incorporate 2 dates and two times. I have tried the following but get an error:</p>
  
  <pre><code>SELECT time,
         close 
    FROM intraday_values 
         between date="2005-03-01" 
     and time="15:30" 
     and date="2005-03-02" 
     and time = "15:14"
  </code></pre>
  
  <p>Could someone help me formulate the query correctly? Many thanks</p>