mysql interval code example
Example 1: mysql add days to date
UPDATE classes
SET `date` = DATE_ADD(`date`, INTERVAL 2 DAY)
WHERE id = 161
Example 2: mysql add days to date
UPDATE classes
SET `date` = DATE_ADD(`date` , INTERVAL 2 DAY)
WHERE `id` = 161;
Example 3: calculate date and convert to yearsmysql
select date1, date2,timestampdiff(YEAR,date2,date1) from so7749639