title: alter the data format using to_date does not change the number of digits (postgresql)
body: <p>I am trying to change the date format of the column "yearcode" into four digits (yyyy), since I do not have the specific day for the data.</p>
  
  <p>However, when I check the data format of the column, the table still shows the date format in "yyyy-mm-dd" format.</p>
  
  <p>Here is the code that I wrote in order to change the format:</p>
  
  <pre><code>alter table postmaster_compensation alter yearcode type date using to_date('1845','yyyy')
  </code></pre>
  
  <p>I wonder if there's any problem with the code, or I cannot change the format into "yyyy" pattern at all? the 9.6 reference says 'yyyy' is a valid date format.</p>
  
  <p>Thanks!</p>