Re: Getting dates.

From: Date: Thu, 12 Oct 2000 16:09:24 +0000
Subject: Re: Getting dates.
Groups: php.db 
Request: Send a blank email to php-db+get-3558@lists.php.net to get a copy of this message
Addressed to: Mattias Hedman <mattias@popwire.com> php-db@lists.php.net ** Reply to note from Mattias Hedman <mattias@popwire.com> Thu, 12 Oct 2000 09:43:09 +0200 > > Hello all! I have a problem... I need to fetch data out of a mySQL > database. The Data should be between 2 specific dates. No trouble so far. > But my problem is that I need to calculate the start and end date with > only the week number to my knowledge. Anyone got any ideas? MySQL includes a week() function. If your week numbers match up, or can be made to match up easily, you might do something like: SELECT * FROM table WHERE WEEK( some_date ) = $WeekNumber See: http://www.mysql.com/documentation/mysql/commented/manual.php?section=Date_and_time_functions Rick Widmer Internet Marketing Specialists www.developersdesk.com

« previous php.db (#3558) next »