user1135357 user1135357 - 1 year ago 131
SQL Question

SQLite Order By Date

Every record in my

SQLite
database contains a field which contains a
Date
stored as a
string
in the format
'yyyy-MM-dd HH:mm:ss'
.

Is it possible to query the database to get the record which contains the most recent date please?

Answer Source

you can do it like this

SELECT * FROM Table ORDER BY date(dateColumn) DESC Limit 1
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download