MySQL Date range query
I have a MySQL query to gather information for a few date ranges. The following query works well for the current month, but things need to change a little, as it is not exactly what I require.
Here is the scenario...
SELECT * FROM TABLE
WHERE YEAR(date_added) = YEAR(CURDATE())
AND MONTH(date_added) = MONTH(CURDATE())
Staff get paid on the last FRIDAY of every month.
The commission cut off date is the FRIDAY before the last Friday.
The week Staff get paid gets added onto the following months information.
I need to somehow be able to select this information via the date_added field.... complex i know!
So i think it needs to be something like...
FIND values BETWEEN the
PREVIOUS months last week
SECOND last Friday of the CURRENT MONTH.
Can anyone whom knows MYSQL help me figure this one out?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)