April 2008
Intermediate to advanced
566 pages
21h 55m
English
WEEKDAY()
WEEKDAY(date)This function returns the number for the day of the week. Monday is considered the first day of the week for this function and returns a value of 0; a Sunday returns 6. Here is an example:
SELECT appt_id, client_id FROM appointments WHERE WEEKDAY(appt) > 4 AND EXTRACT(YEAR_MONTH FROM appt) = EXTRACT(YEAR_MONTH FROM NOW( ));
This SQL statement, based on the WHERE
clause, retrieves a list of appointments that are on the weekends of
the current month.
Read now
Unlock full access