Display Dates between from date to date

Ambitious contributor
13Feb2012,05:34   #1
newphpcoder's Avatar
Hi...
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
Ambitious contributor
29May2012,02:08   #2
pein87's Avatar
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...
Contributor
30May2012,01:43   #3
Alex.Gabriel's Avatar
Full year or just a defined period ?