I need to get the sorted dates by query in SQLite that are in timestamp format
I tried this query but not works well
SELECT * FROM allmessages WHERE TIMESTAMP <= DATE('now','-365 day') AND TIMESTAMP >= DATE('now') order by TIMESTAMP DESC
I need sorted dates like
From today to before 1 year
From today to before 30 days
From today to before 7 days
These are the dates that are in DB
Sory for bad english...