postgresql convert timestamp to date and day code example Example: postgres timestamp to datetime to_timestamp(field_name)::timestamp