date postgresql code example
Example 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);
Example 2: postgresql today - 1 year
select now() - INTERVAL '1 YEAR';
Example 3: postgre query date
SELECT * FROM data WHERE date = '2020-12-21'