How to convert number of week into date?

In MySQL the STR_TO_DATE() function can do the trick in just one line!


Example: We want to get the date of the Tuesday of the 32th week of the year 2013.

SELECT STR_TO_DATE('2013 32 Tuesday', '%X %V %W');

would output:

'2013-08-13'

I think this is the best and shortest solution to your problem.

Leave a Comment