title: Formatting SQL query output in Python/SQLite 3
body: <p>I use a simple SQL query in Python to grab records from a SQLite 3 database:</p>
  
  <pre><code>cursor.execute ("SELECT due, task FROM tasks WHERE due &lt;&gt; '' ORDER BY due ASC")
          rows = cursor.fetchall()
              for row in rows:
                  print '\n%s %s' % (row[0], row[1])
  </code></pre>
  
  <p>The <em>due</em> field in the database is set to DATE type, so the query returns the data in this field formatted as <em>2010-07-20 00:00:00.00</em> How can I remove the <em>00:00:00.00</em>, so the result contains only the date? Thanks!</p>