Get current week
Posted: Thu Jan 17, 2008 8:44 pm
I'm trying to do a query to get items that fall within the current week... This is the query i'm using
This doesn't work though, it returns zero results, but created_dt has date stamps for today..
Any ideas? Thanks!
Code: Select all
SELECT a.id, a.name, a.description, a.category_id, a.language_id, a.guid from quizzes a
inner join quiz_ratings b on a.id = b.quiz_id
where a.active = '1' and YEARWEEK(b.created_dt) = YEARWEEK(CURRENT_DATE - INTERVAL 7 DAY)
Any ideas? Thanks!