title: Creating a date column with date format in SQL
body: <p>I'm creating a table that contains a date registered column. I want it formatted as "YYYY-MM-DD". I've already attempted this...</p>
  
  <pre><code>CREATE TABLE patient(
      dateregistered text format 'YYYY-MM-DD' not null
  );
  </code></pre>
  
  <p>Now, the problem I'm having is, when I enter a date in a different format <em>(i.e. 11-05-2015)</em>, it accepts that date in the table. Shouldn't it be giving me an error message or reformating it to the format I set? <em>(I prefer the later, unless the data entered erroneous i.e. 32-13-20015)</em></p>
  
  <p>Can someone let me know what I'm doing wrong?</p>
  
  <p>Kind regards.</p>