For when you want to add times greater than 839 hours.
CREATE FUNCTION ADDTIME_OLD(d datetime, t varchar(12))
RETURNS datetime
DETERMINISTIC
RETURN ADDTIME(
d + INTERVAL SUBSTRING_INDEX(t, ‘:’, 1) HOUR,
CONCAT(IF(LEFT(t, 1) = ‘-‘, ‘-‘, ”), ’00:’, SUBSTRING_INDEX(t, ‘:’, -2))
);
(Almost the same. I’m not going to figure out how to do the “you can use any delimiter you want” that MySQL supports.)