title: Query Time range between Dates using DATETIME mysql
body: <p>I have a database table that has fields as such :</p>
  
  <pre><code>TIME(Datetime)        Update_ID
  2013-11-25 05:00:14     XC3
  2013-11-25 06:00:13     XC4
  2013-11-25 06:00:19     XC5
  2013-12-25 23:00:14     XC6
  2013-12-25 24:00:00     XC7
  </code></pre>
  
  <p>So assuming i want to find a trend on the updates to know which period of the day has the a particular number of updates, what i initially think of is doing something like this :</p>
  
  <pre><code>SELECT COUNT(TIME) FROM  table WHERE TIME between '06:00:00' and '12:00:00' 
  </code></pre>
  
  <p>But this doesn't work because i think since the date is not added with the time, a default value for date is added(some date around 1970). If, i add the beginning and enddate in my query, i am afraid it won't give me the results i need.</p>