postgres extract date from timestamp code example
Example 1: postgresql get date from datetime
SELECT DATE(column_name) FROM table_name;
Example 2: postgres extract date from timestamp
SELECT DATE(column_name) FROM table_name;
Example 3: postgres extract date from timestamp
SELECT DATE(SUBSTRING('2018-07-25 10:30:30' FROM 1 FOR 10));
Example 4: postgres extract date from timestamp
SELECT '2018-07-25 10:30:30'::TIMESTAMP::DATE;