In field ‘a’ i have date with format TIMESTAMP. E.g. 2010-10-12 12:00:00, format is yyyy-mm-dd hh:mm:ss. What i need to do is change 2010-10-12 12:00:00 to 2010-12-10 12:00:00 without changing format (yyyy-mm-dd hh:mm:ss). Months and dates were send in wrong places. Max month is 12 and max day is 12 too (becouse months were send there). All instances with original day more then 12 are ‘0000-00-00 00-00-00’.
doing this on MySql.
tried this but it just set all dates to 0000-00-00 00:00:00
update table_a set date=concat(substring(date, 1, 4), ‘-‘, substring(date, 9, 10), ‘-‘, substring(date, 6, 7),substring(date,11,19))
Make use of this example