postgresql select now minus days code example
Example 1: 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;
Example 2: current date in postgresql minus 1 day
CURRENT_DATE-INTERVAL '1 DAY'