recasting to timestamp from varchar

From: Kirk Wythers <kirk(dot)wythers(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: recasting to timestamp from varchar
Date: 2013-01-04 17:16:57
Message-ID: F6271478-F35C-4A05-8173-00DBAFC7FD6C@gmail.com
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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2013-01-04 17:27:42 Re: recasting to timestamp from varchar
Previous Message Kirk Wythers 2013-01-04 17:00:47 recasting to timestamp from varchar