recasting to timestamp from varchar

From: Kirk Wythers <wythe001(at)umn(dot)edu>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: recasting to timestamp from varchar
Date: 2013-01-04 17:00:47
Message-ID: 5B20B39F-5231-4923-954F-51E06E3BFA3E@umn.edu
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to re-cast a column as a timestamp>

ALTER TABLE sixty_min ALTER COLUMN time2 TYPE timestamp;
ERROR: column "time2" cannot be cast to type timestamp without time zone

The column time2 is currently a varchar. I actually do not want to mess with time zones, but it seems that postgres will not let me do this. The actual values in the column time2 look like this:

7/15/08 12:00

Is this possible?

Thanks in advance.

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wythers 2013-01-04 17:16:57 recasting to timestamp from varchar
Previous Message Ali Pouya 2013-01-04 16:26:37 Re: Monitoring streaming replication from standby on Windows