title: DATE_FORMAT within a query in CodeIgniter using Active Record don't work
body: <p>coders. I'm running a little problem here and can't find the solution. I'm building a query using Active Record from CI. This is the code for the query:</p>
  
  <pre><code> $this-&gt;db-&gt;select("u.id AS user_id, u.email, p.display_name, p.first_name, p.last_name, s.status_id, s.message");
      $this-&gt;db-&gt;select("DATE_FORMAT(s.created_at, `Publicado el %d/%m/%Y a las %h:%i %p`) AS created_at", FALSE);
  
   $this-&gt;db-&gt;join($this-&gt;_table_users . ' u', 'u.id = s.user_id');
   $this-&gt;db-&gt;join($this-&gt;_table_profiles . ' p', 'p.user_id = u.id');
  
   $this-&gt;db-&gt;where_in('user_id', $str);
   $this-&gt;db-&gt;where('deleted', 0);
  
   $this-&gt;db-&gt;from($this-&gt;_table . ' s');
  
   $this-&gt;db-&gt;order_by('s.created_at', 'desc');
  </code></pre>
  
  <p>But I'm getting this error:</p>
  
  <blockquote>
    <p>Error Number: 1054</p>
    
    <p>Unknown column 'Publicado el %d/%m/%Y a las %h:%i %p' in 'field list'</p>
    
    <p>SELECT <code>u</code>.<code>id</code> AS user_id, <code>u</code>.<code>email</code>, <code>p</code>.<code>display_name</code>, <code>p</code>.<code>first_name</code>, 
    <code>p</code>.<code>last_name</code>, <code>s</code>.<code>status_id</code>, <code>s</code>.<code>message</code>, DATE_FORMAT(s.created_at, <code>Publicado el &gt; %d/%m/%Y a las %h:%i %p</code>) AS created_at FROM (<code>default_status</code> s, <code>default_status</code>) JOIN > <code>default_users</code> u ON <code>u</code>.<code>id</code> = <code>default_s</code>.<code>user_id</code> JOIN <code>default_profiles</code> p ON 
    <code>p</code>.<code>user_id</code> = <code>u</code>.<code>id</code> WHERE <code>user_id</code> IN ('5726, 2, 10293') AND <code>deleted</code> = 0 ORDER 
    BY <code>s</code>.<code>created_at</code> desc LIMIT 2</p>
  </blockquote>
  
  <p>Does any know where I can use DATE_FORMAT within this query? The funny is the same query write as pure SQL works
  Cheers and thanks in advance</p>