run your query using distinct?
I'm not clear on your question. You can run a query such at
"Select distinct months from table";
that will return a list of all the months in there. so if you have data for january 1-21, march 1-18 and december 8-24. It will return:
January, March, December