Sqlite SELECT * for Last 7 days

后端 未结 1 623
粉色の甜心
粉色の甜心 2021-01-18 03:03

Im trying to do a SELECT * to retrieve rows for last 7 days in SQLite.

the table structure is as follows

CREATE TABLE \'session\' (\'rowID\' INTEGER          


        
1条回答
  •  死守一世寂寞
    2021-01-18 03:46

    SELECT * FROM session WHERE stop_time > (SELECT DATETIME('now', '-7 day'))
    

    Refer to the documentation

    0 讨论(0)
提交回复
热议问题