RE: [PHP] date queries
| From: | John W. Holmes | Date: | Mon, 25 Nov 2002 02:15:05 +0000 |
| Subject: | RE: [PHP] date queries | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125858@lists.php.net to get a copy of this message | ||
> Sorry for this post I know this is a mysql related question, i just
wanna
> have other comments.suggestions from this list.
> I have a problem regarding date queries in mysql. Im creating
inventory
> reports in PHP. I want to query from the date field a weekly report
for a
> specific month, year, and week.
SELECT * FROM your_table WHERE YEARWEEK(your_date_column) = $x
Where $x is a YEARWEEK in the format YYYYWW. WW is 0 - 53. Read the
manual for more info...
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html
#Date_and_time_functions
---John Holmes...