title: How to get date format in result set?
body: <p>I have a sql to get data form mysql their I used dateformat to convert date required format
  Here is the sql</p>
  
  <pre><code>SELECT 
   m.id,
   m.subject,
   m.body,
   m.read,
   m.hide,
   m.thread_id,
   DATE_FORMAT(m.sent_date, '%d-%b-%Y') sent_date,
   u.username to_name
   FROM 
   messages m,
   users u
   WHERE 
   u.school_id = m.school_id AND
   u.id = m.to_user_id AND
   m.school_id = 18 AND
   m.user_id = 53 AND
   m.status = 'sent'
   ORDER BY m.sent_date DESC
  </code></pre>
  
  <p>When I run this sql directly in mysql it works fine, sent_date comes as (19-Apr-2010). When I excute this in ruby, in result set the sent_date is stores as (Tue Apr 20 00:00:00 UTC 2010)</p>
  
  <pre><code>messages = Message.find_by_sql(sql)
  puts messages[0]['sent_date']
  </code></pre>
  
  <p>puts statement prints "Tue Apr 20 00:00:00 UTC 2010"</p>
  
  <p>how to get same date format in mysql result and ruby result set.</p>
  
  <p>Thanks</p>