Make a range of months between a period
Petri BRAug 23 2010 — edited Aug 24 2010I want to make a select that gives me a range of months between a period.
I have some initial date and some final date, I want to make a select that returns all the possible months between these dates.
Like that:
Initial date: 01/08/2009
Final date: 16/06/2010
The select would return:
MONTH | YEAR
-----------------------
08 | 2009
09 | 2009
10 | 2009
11 | 2009
12 | 2009
01 | 2010
02 | 2010
03 | 2010
04 | 2010
05 | 2010
06 | 2010
Remembering, I just have two dates, so for a single register I will get a list of months.
Can anyone help me with that please?
Thank you all.