PostgreSQLDate/Time FunctionsTO_DATE
DATE_TRUNC

TO_DATEDate/Time Functions

TO_TIMESTAMP

Converts a string to a date.

Syntax

TO_DATE(str, format)

Example

Enter values below to update the example in real time.

parsed_date
SELECT TO_DATE('2024-06-27', 'YYYY-MM-DD') AS parsed_date;