Skip to content

SPECIFICTYPE

SELECT CAST('01-Jan-2020' AS DATE) SPECIFICTYPE;
specifictype
-------------------
2020-01-01
(1 row)

The SPECIFICTYPE keyword used here in PostgreSQL is a part of the CAST function. This command takes the string ‘01-Jan-2020’ and converts, or “casts”, it into a DATE type. The result is outputted in the default date format ‘YYYY-MM-DD’.