Answers for "postgresql now minus 12 months"

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

postgres select from last 3 months

SELECT * from table where date >  CURRENT_DATE - INTERVAL '3 months'
Posted by: Guest on October-15-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language