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