user1135357 user1135357 - 1 year ago 121
SQL Question

SQLite Order By Date

Every record in my

database contains a field which contains a
stored as a
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