Posted on 16th September 2024|399 views
Can we convert Timestamp to date format in PostgreSQL?
Posted on 16th September 2024| views
For example:
SELECT DATE(column_name) FROM table_name;
SELECT '1999-05-15 03:45:10'::TIMESTAMP::DATE;
SELECT DATE(SUBSTRING('1999-05-15 03:45:10' FROM 1 FOR 10));
Result:
‘1999-05-15 03:45:10’ ---- ‘1999-05-15’