SQLite Order By Date1530019888000

前端 未结 9 749
臣服心动
臣服心动 2020-12-01 03:27

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

9条回答
  •  醉话见心
    2020-12-01 03:47

    You can also use the following query

    "SELECT * FROM Table ORDER BY strftime('%Y-%m-%d %H:%M:%S'," + dateColumn + ") DESC  Limit 1"
    

提交回复
热议问题