I want to generate a list of last date of every month between two dates. For example, i want to generate
From 2004-01-31
to 2005-08-31
and the result should be like this
2004-01-31
2004-02-29
2004-03-31
2004-04-30
2004-05-31
.
.
.
2005-07-31
2005-08-31
Can anyone help me how to do it and got that result in PostgreSQL? Thanks! Im using postgreSQL 8.2.15