I'm using SQLite, I want to get all the students who are having their DOB between 01-01-2000
and 12-12-2010
. The dates are in TEXT
and mm-dd-YY
format in my database. I've done like this:
SELECT * FROM student_details
WHERE strftime('%m-%d-%Y', studentDob)
BETWEEN strftime('%m-%d-%Y', '01-01-2000')
AND strftime('%m-%d-%Y', '12-12-2010')
But it is not giving any result even though the records are there in my DB. Please help me if there any wrong in my query. It not even producing any error.