Вот простой способ сделать это:
SELECT EventDate, (week(EventDate) - week(curdate())) AS WeeksOut FROM Events;
Пример:
mysql> select week('2010-11-18') - week ('2010-10-18');
+------------------------------------------+
| week('2010-11-18') - week ('2010-10-18') |
+------------------------------------------+
| 4 |
+------------------------------------------+
1 row in set (0.00 sec)
Другой вариант - рассчитать интервал в днях и разделить на 7:
SELECT EventDate, datediff(EventDate,curdate())/7 AS WeeksOut FROM Events;
Пример:
mysql> select datediff('2010-11-18' , '2010-10-18') / 7;
+-------------------------------------------+
| datediff('2010-11-18' , '2010-10-18') / 7 |
+-------------------------------------------+
| 4.4286 |
+-------------------------------------------+
1 row in set (0.00 sec)