Answers for "PQSQL NOW + 1 cday"

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
3

postgresql today - 1 year

select now() - INTERVAL '1 YEAR';
Posted by: Guest on September-18-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language