Getting error function to_date(timestamp without time zone, unknown) does not exist
Three year later. You can cast
SELECT
to_date(cast(createddate as TEXT),'YYYY-MM-DD')
FROM
product_trainings;
And even neater:
SELECT to_date(createddate::TEXT,'YYYY-MM-DD')
FROM product_trainings;
It seems like all it needs is a conversion from timestamp to text as function definition is: to_date(text,text).
Perhaps in 8.2 this conversion from timestamp to text was already predefined.
http://www.postgresql.org/docs/8.4/static/functions-formatting.html