I am comparing time in android sqlite database, here is my table structure in the screen shots. Actually I have two times, like 8:00 and 7:30 (basically these are employee shift timings) in the string and I have a column c_TIME
in my database and I want all the records who lies in b/w my two time i.e.(8:00 and 7:30) from c_TIME.
I have used this query but it is not working, please anyone guide me what I am doing wrong
SELECT *
FROM ATTENDANCE
WHERE strftime('%H','08:00') > strftime('%H', c_TIME) AND
time('08:00') < strftime('%H', c_TIME) AND
STATE = 'IN'