I have the week number and year as separate fields in MySQL, how do I compute the last day of the week(Sunday) in the given year?
+1
A:
SELECT STR_TO_DATE('201038 Sunday', '%X%V %W');
This gives you sunday of the current week (38/2010). I used sunday because the "last day" is not consistend. sometimes its sunday, sometimes saturday (week starts on monday)...
Joe Hopfgartner
2010-09-22 10:49:17