I'm attempting to modify a date field from my database before it gets outputted to the view, but I'm not having much luck. This code doesn't seem to work, what am I doing wrong?
function get_journal_entry($id)
{
$sql = 'SELECT * FROM journal WHERE user_id = '.$this->tank_auth->get_user_id().' AND id = '.$id;
$query = $this->db->query($sql);
$query['created'] = date("c", strtotime($query['created']));
return $query->row_array();
}