title: Python => ValueError: unsupported format character 'Y' (0x59)
body: <p>I don't understand the ValueError with Y. I escape with %...</p>
  
  <pre><code>table = town+"_history"
  db.execute("SELECT DATE_FORMAT(snapdate,'%%Y-%%m-%%d') AS date, SUM( population ) AS accountpopulation, count( blockid ) AS number_block FROM %s WHERE blockid =%%s GROUP BY snapdate ORDER BY snapdate DESC LIMIT 7" % table, (blockid))
  </code></pre>