Answers for "postgresql add days to date"

SQL
8

today minus 15 days postgresql

--yesterday
SELECT NOW() - INTERVAL '1 DAY';

--Unrelated to the question, but PostgreSQL also supports some shortcuts:
SELECT 'yesterday'::TIMESTAMP, 'tomorrow'::TIMESTAMP, 'allballs'::TIME;
Posted by: Guest on March-05-2020
0

mysql add days to date

UPDATE classes 
SET `date` = DATE_ADD(`date`, INTERVAL 2 DAY)
WHERE id = 161
Posted by: Guest on September-02-2020
0

mysql add days to date

UPDATE classes 
SET `date` = DATE_ADD(`date` , INTERVAL 2 DAY)
WHERE `id` = 161;
Posted by: Guest on September-02-2020
0

select current_timestamp - interval '3 days';

SELECT current_timestamp - interval "3 days";
-- 2020-06-24 08:25:31.759993 America/Los_Angeles
Posted by: Guest on October-22-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language