I need to add 12 hours to a MySQL TIME field (not DATETIME) and I’m having trouble.
UPDATE `events`
SET start_time = DATE_ADD(start_time, INTERVAL 12 HOUR)
WHERE `start_time` < '11:00:00'
returns with no errors but doesn’t change anything, I think because start_time is a TIME field.
UPDATE `events`
SET start_time = start_time + '12:00:00'
WHERE `start_time` < '11:00:00'
adds 12 seconds.
Try using ADDTIME instead of DATE_ADD. You could do
SET start_time = ADDTIME(start_time, '12:00:00')