Display Dates between from date to date

newphpcoder's Avatar, Join Date: Sep 2010
Ambitious contributor
Good day!
I have table that has a field from_date and to_date.
Now I just want to know if how can I display as table format the dates between from_date to_date.
Like this
from_date: 2011-12-16
to_date: 2011-12-31
I want to display it:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 // table format.
Thank you
pein87's Avatar
Ambitious contributor
use the

Code: SQL
BETWEEN date AND date

in the end

You can use the YEAR and MONTH functions as well but you need date to be a date type like datetime, date, etc...
Alex.Gabriel's Avatar
Full year or just a defined period ?