Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Display Dates between from date to date (http://www.go4expert.com/forums/display-dates-date-date-t27780/)

newphpcoder 13Feb2012 05:34

Display Dates between from date to date
 
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

pein87 29May2012 02:08

Re: Display Dates between from date to date
 
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 30May2012 01:43

Re: Display Dates between from date to date
 
Full year or just a defined period ?


All times are GMT +5.5. The time now is 20:53.