I have a date_time
column in my table.
How do I get the date for the start of the week, i.e. the date 2011-01-09 13:44:00
would return 2011-01-07 00:00:00
?
I have looked over MySQL Date functions but wasn't able to figure out how to do it.
I tried something like this...
DATE_ADD( YEAR( NOW( ) ) , INTERVAL WEEK( NOW( ) ) WEEK ) AS `start_of_week`
But all I got was NULL
.
How do I do this?