timestamp to date postgresql code example
Example 1: postgres timestamp to datetime
to_timestamp(field_name)::timestamp
Example 2: postgresql today - 1 year
select now() - INTERVAL '1 YEAR';
to_timestamp(field_name)::timestamp
select now() - INTERVAL '1 YEAR';