|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
On Apr 15, 1:27 pm, lawp...@gmail.com wrote:
> Given the year $year and the week $week, something like > > SELECT DATE_ADD( '$year-01-01', INTERVAL $week WEEK ) > > To get the first day of that week? After some testing, I found that the syntax above does not give desired results. For instance SELECT DATE_ADD( '2008-01-01', INTERVAL 1 WEEK ) Returns 2008-01-08 It simply added 7 days, or one week, to the date. Since Jan 1 '08 is not the start of the week, but rather a Tuesday, I got back the date of Tuesday of week 1, 2008. |
|
![]() |
| Outils de la discussion | |
|
|