Date Translation in MySQL

From: Date: Tue, 05 Aug 2008 18:09:49 +0000
Subject: Date Translation in MySQL
Groups: php.db 
Request: Send a blank email to php-db+get-45175@lists.php.net to get a copy of this message
I'm looking for a quick and simple way to query a MySQL database by date, or more specifically, by day of the week. My dates are stored in the DB in YYYY-MM-DD HH:MM:SS format. Question, is there a built-in for PHP or MySQL that will take this column and return only Saturdays, for example, without having to use PHP to find each of the last X number of Saturdays and then for each Saturday, query the database? In case it matters, I am running on PHP v 4.4.7 and MySQL version 4.1.22. Thanks in advance.

« previous php.db (#45175) next »