I have the following table :
--------------------------------------
| Year | Week | Weekday | Date |
--------------------------------------
| 2019 | 20 | 3 | |
| 2019 | 10 | 4 | |
| 2019 | 2 | 1 | |
| 2019 | 41 | 2 | |
--------------------------------------
I would like the last column to be filled with the exact date ("Y-M-d"), based on year, week and weekday from the other columns. Is it possible to do this in one MYSQLi query ? So far, I tried:
UPDATE table
SET Date = STR_TO_DATE(Year Week Weekday, '%X %V %w')
AND
UPDATE table
SET Date = DATE(STR_TO_DATE(Year Week Weekday, '%X %V %w'))
AND
UPDATE table
SET Date = DATE(DATE_FORMAT(Year Week Weekday, '%Y %m %d'))
Without succes. Any ideas on how to get this in one query ?