PostgreSQLDate/Time FunctionsTO_TIMESTAMP
TO_DATE

TO_TIMESTAMPDate/Time Functions

TO_CHAR

Converts a string to a timestamp.

Syntax

TO_TIMESTAMP(str, format)

Example

Enter values below to update the example in real time.

ts
SELECT TO_TIMESTAMP('2024-06-27 14:30:00', 'YYYY-MM-DD HH24:MI:SS') AS ts;