title: Codeigniter: Order by ascending date
body: <p>Hi this is my model code for ordering and getting the data:</p>
  
  <pre><code>$this-&gt;db-&gt;order_by($oBy, "asc");
  $query = $this-&gt;db-&gt;get('books');
  </code></pre>
  
  <p>Everything is working fine, however in my database i am storing the date as a string, e.g. 01-Jan-2014.</p>
  
  <p>Therefore when i order the date it will order it by the day and not year, may i know how can i solve it by sorting by the year, however the data will still display out as 01-Jan-2014 and also it will be displayed in ascending order? Thank you!</p>
  
  <p>Error:<img src="https://i.stack.imgur.com/O2fHE.jpg" alt="enter image description here"></p>