title: SQLite - select row by year only?
body: <p>How can I select rows from a table by year only?</p>
  
  <pre><code>SELECT * FROM speckdata AS s WHERE DATE_FORMAT(s.localdate, '%Y') = '2014')
  </code></pre>
  
  <p>I could get the result in <code>MySQL</code></p>
  
  <p>Now on <code>sqlite</code> I get this error,</p>
  
  <blockquote>
    <p>SQLiteManager: Likely SQL syntax error: SELECT*
                  FROM speckdata AS s
                  WHERE DATE_FORMAT(s.localdate, '%Y') = '2014') [ near ")": syntax error ] Exception Name: NS_ERROR_FAILURE Exception Message: Component
    returned failure code: 0x80004005 (NS_ERROR_FAILURE)
    [mozIStorageConnection.createStatement]</p>
  </blockquote>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>If I change it to,</p>
  
  <pre><code>WHERE DATE(s.localdate, '%Y') = '2014'
  </code></pre>
  
  <p>It return no result.</p>
  
  <p>BTW, the <code>localdate</code> is in date-time format such as <strong>2014-10-09 14:59:53</strong></p>