samedi 24 octobre 2015

Query SQlite Database where month is equal to...? [duplicate]

This question already has an answer here:

Spent about a week on this.

I have got an Android App which I want a listview of items based on their month.

So in the database I have DateTime column which looks like this in the DB - 2015-10-24 07:53:04

I am using ADB atm so I can check I am using the correct sql. This is the query I am using

select * from itemtable where date = strftime('%m', '10'); 

So I am looking to get the rows where the date is the 10th month. I get nothing back off the query. When using strftime it works fine.

I must be missing something. Any help would be fantastic!

Thanks.

Aucun commentaire:

Enregistrer un commentaire