PostgreSQL – Extract date from timestamp

To extract date from timestamp field, you can simply use the date function as shown below; where timestamp_column is the name of the column that holds a timestamp in your table – table_name.

SELECT date(timestamp_column) FROM table_name;

   date
----------
2021-05-05

Output will be just the date without time.

See also  PostgreSQL - Count distinct over multiple columns