title: Get date time in correct format from SQL query
body: <p>I have a column <code>ifd0_DateTime</code> , in a table named <code>photo</code>, which contains date time in following format: <code>1966:12:22 17:19:57</code>. 
  I need to count the number of photos month wise for every year.</p>
  
  <p>So far I have this query. but it doesn't work correctly.</p>
  
  <p><code>SELECT ifd0_DateTime, count(*) FROM photo
  group by YEAR(ifd0_DateTime), MONTH(ifd0_DateTime);</code></p>
  
  <p>Could anyone please fix this ?</p>