title: How to change datestyle in PostgreSQL
body: <p>I know this has been asked many times but no matter what I try in PostgreSQL 9.4, the datestyle will revert to ISO,MDY within a minute or so. I require the date format:</p>
  
  <pre><code>SET datestyle to SQL,DMY;
  Show datesyle;
  </code></pre>
  
  <p>E.g. dd/mm/yyyy ... - After entering this, the 'show' command displays SQL,DMY</p>
  
  <pre><code>SELECT NOW();
  </code></pre>
  
  <p>Displays the current date in correct format</p>
  
  <p>Each time I apply this setting and look at my date column it still turns my input into yyyy-mm-dd. Then shortly after if i run:</p>
  
  <pre><code>Show datestyle;
  </code></pre>
  
  <p>It's back to ISO,MDY.</p>
  
  <p>I have applied the datestyles in three other ways:</p>
  
  <pre><code>ALTER DATABASE "database" SET datestyle TO SQL,DMY;
  
  ALTER USER "User" SET datestyle to SQL,DMY;
  </code></pre>
  
  <ul>
  <li>postgresql.config - Changed the datestyle variable and restarted the server</li>
  </ul>
  
  <p>I have spent hours looking up advice and tried editing LC_TIME and the results are the same. </p>