jeudi 26 février 2015

Selecting Unique Months and Years From a SQLITE database

I have a column called (date) in an expenses table that displays a date in the formate "2015-02-15". I want to build a list of the Distinct unique months and years so that the user can pick what month to show. I have tried using the following answer without any luck.



"1" "1" "Food Shopping" "156" "2015-01-15"
"2" "1" "Water" "200" "2015-02-15"
"3" "2" "Car Maintenance" "30" "2014-12-15"
"4" "4" "Boobs" "200" "2015-02-15"


So Ideally I should get



December 2014
January 2015
February 2015


Could someone point me in the right direction. Thanks.


Aucun commentaire:

Enregistrer un commentaire