title: How to change a date format in postgres?
body: <p>I am trying to convert a character varying date field to the format YYYYMMDD and below is the select query I tried. The output format is 1999-04-27 (YYYY-MM-DD). Admindate is the field name in the table.</p>
  
  <pre><code>select to_date( admindate,'MMDDYYYY')  from test;
  </code></pre>
  
  <p>Can someone please advice what I am doing wrong?</p>