How would I display a specific date depending on the query string?
My query string will have "month" and "year" variables.
Display specific date
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
SELECT * FROM `table` WHERE EXTRACT(MONTH FROM `dateField`) = '09' AND EXTRACT(YEAR FROM `dateField`) = '2005'http://dev.mysql.com/doc/mysql/en/date- ... tions.html
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
date('Y-m-d',mktime(12,0,0,9,1,2005,0));Re: Display specific date
I reread and reread and I finally got what you mean... you want to format the dates gotten out of the query...vchris wrote:How would I display a specific date depending on the query string?
My query string will have "month" and "year" variables.
Code: Select all
date('Y-m-d',strtotime($record['date']));