title: How to combine date and time from different MySQL columns to compare to a full DateTime?
body: <p>Column <code>d</code> is DATE, column <code>t</code> is time, column <code>v</code> is, for example, INT. Let's say I need all the values recorded after 15:00 of 01 Feb 2012 and on. If I write</p>
  
  <pre><code>SELECT * FROM `mytable` WHERE `d` &gt; '2012-02-01' AND `t` &gt; '15:00'
  </code></pre>
  
  <p>all the records made before 15:00 at any date are going to be excluded from the result set (as well as all made at 2012-02-01) while I want to see them. It seems it would be easy if there were a single DATETIME column, but there are separate columns for date and time instead in the case of mine.</p>
  
  <p>The best I can see now is something like</p>
  
  <pre><code>SELECT * FROM `mytable` WHERE `d` &gt;= '2012-02-02' OR (`d` = '2012-02-01' AND `t` &gt; '15:00')
  </code></pre>
  
  <p>Any better ideas? Maybe there is a function for this in MySQL? Isn't there something like</p>
  
  <pre><code>SELECT * FROM `mytable` WHERE DateTime(`d`, `t`) &gt; '2012-02-01 15:00'
  </code></pre>
  
  <p>possible?</p>