Answers for "postgres date add day"

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

substract variable amount of minutes from timestamp postgresql

SELECT p.date_time + number_of_seconds * INTERVAL '1 second'
    FROM photo p 
    WHERE p.id = 1;
Posted by: Guest on October-16-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language