tags:

views:

45

answers:

2

Hi,

I have varchar data type column and date data type column . I have to update varchar column data into date column in PostgreSQL.

Is it possible?

Thanks.

chandu

+3  A: 
to_date('05 Dec 2000', 'DD Mon YYYY')
MJB
+2  A: 
UPDATE tableName SET  dateColumn= to_date(varcharColumn, 'DD MM YYYY')

Assuming you are saving "07 04 2010"

if not Reffer following link

:- http://www.postgresql.org/docs/8.1/interactive/functions-formatting.html

Salil
Solution is correct, the url to a very old manual is a little hmmmm.... 8.1 will not be supported as of November 2010. Better use a newer version.
Frank Heikens