Answers for "psql if date is before"

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
1

psql datetime grather than

SELECT *
FROM table
WHERE update_date >= '2013-05-03'::date
AND update_date < ('2013-05-03'::date + '1 day'::interval);
Posted by: Guest on June-25-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language