MySQL add 12 hours to a time field
Try using ADDTIME instead of DATE_ADD. You could do SET start_time = ADDTIME(start_time, '12:00:00')
UPDATE `events`
SET start_time = start_time + INTERVAL 12 HOUR
WHERE `start_time` < '11:00:00'
The MySQL functions that accept INTERVAL
arguments are mostly unnecessary; you can just add and subtract intervals with +
and -
.
set start_time = ADDTIME(start_time,'12:00:00')
DATE_ADD works fine with timestamp etc, but not with TIME