postgresql add days to date code example
Example 1: today minus 15 days postgresql
SELECT NOW() - INTERVAL '1 DAY';
SELECT 'yesterday'::TIMESTAMP, 'tomorrow'::TIMESTAMP, 'allballs'::TIME;
Example 2: mysql add days to date
UPDATE classes
SET `date` = DATE_ADD(`date`, INTERVAL 2 DAY)
WHERE id = 161
Example 3: mysql add days to date
UPDATE classes
SET `date` = DATE_ADD(`date` , INTERVAL 2 DAY)
WHERE `id` = 161;
Example 4: select current_timestamp - interval '3 days';
SELECT current_timestamp - interval "3 days";