title: Mysql Compare two datetime fields
body: <p>I want to compare two dates with time, I want all the results <code>from tbl where date1 &gt; date2</code></p>
  
  <pre><code>Select * From temp where mydate &gt; '2009-06-29 04:00:44';
  </code></pre>
  
  <p>but it is just comparing dates not time. it is giving me all the result set of today's date</p>
  
  <pre><code>'2009-06-29 11:08:57'
  '2009-06-29 11:14:35'
  '2009-06-29 11:12:38'
  '2009-06-29 11:37:48'
  '2009-06-29 11:52:17'
  '2009-06-29 12:12:50'
  '2009-06-29 12:13:38'
  '2009-06-29 12:19:24'
  '2009-06-29 12:27:25'
  '2009-06-29 12:28:49'
  '2009-06-29 12:35:54'
  '2009-06-29 12:36:54'
  '2009-06-29 12:49:57'
  '2009-06-29 12:58:04'
  '2009-06-29 04:13:20'
  '2009-06-29 04:56:19'
  '2009-06-29 05:00:23'
  '2009-06-29 05:04:26'
  '2009-06-29 05:08:17'
  '2009-06-29 05:26:57'
  '2009-06-29 05:29:06'
  '2009-06-29 05:32:11'
  '2009-06-29 05:52:07'
  </code></pre>
  
  <p>Thanks in advance!</p>