error: cast the timestam expression

From: friendVU admin <maillist(at)friendvu(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: error: cast the timestam expression
Date: 2005-01-28 14:55:58
Message-ID: 41FA527E.9050005@friendvu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

When I execute this:
"insert into comments
(
date_posted
)

(select date_published
from xyz
)"

I get :
"ERROR: column "date_posted" is of type timestamp without time zone but
expression is of type text
HINT: You will need to rewrite or cast the expression."

Both dates are of type timesamp!
I searched how to cast, and can't find it.

What is the syntax to cast a timestamp to a timestamp?
tia,
.V

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-01-28 15:04:12 Re: error: cast the timestam expression
Previous Message Muhyiddin A.M Hayat 2005-01-28 14:26:48 Calendar Function