date_trunc PostGres
SELECT DATE_TRUNC('hour', TIMESTAMP '2017-03-17 02:09:30');
GutoTrosla
SELECT DATE_TRUNC('hour', TIMESTAMP '2017-03-17 02:09:30');
SELECT *
FROM table
WHERE update_date >= '2013-05-03'::date
AND update_date < ('2013-05-03'::date + '1 day'::interval);
select now() - INTERVAL '1 YEAR';