I am inserting data in table with current system time like
System.currentTimeMillis()
. So, while getting data I need to take last 3 hours data only.
Following link not help me. because this link using specific date format which I don't have.
Getting data according to last hours from sqlite
Here Is my Query but seems it's not working.
SELECT * FROM Table1 where timestamp >= datetime('now','-3 hours')
Where timestamp is nothing but current system time while inserting.
Please give me any reference or hint.