title: PostgreSQL: replace string with datetime
body: <p>I have a varying character field (datestring) with a timestamp and I want to convert it to timestamp type. I can successfully create a new timestamp column (see below) and populate this column with a formatted version of the column datestring but I would rather not create a new field, I just want to replace the datestring field with a timestamp version of itself.</p>
  
  <p>So this works fine:</p>
  
  <pre><code>ALTER TABLE service_areas ADD COLUMN newdate timestamp
  update service_areas set newdate = to_timestamp(datestring, 'YYYY-MM-DD HH24:MI:SS.MS')
  </code></pre>
  
  <p>But I'd like to do something like:</p>
  
  <pre><code>update service_areas set datestring = to_timestamp(datestring, 'YYYY-MM-DD HH24:MI:SS.MS')
  </code></pre>
  
  <p>Suggestions?</p>
  
  <p>Z</p>