> 
> This is my model
> 
> 
> 

```
function get_archive_links(){
        //$this->db->select('date');
        $this->db->select("date, date_format(date, 'f jS, Y')");
       // $this->db->group_by('MONTH(date), YEAR(date)');
        $query = $this->db->get('blog');
        $results['chart_data'] = $query->result();
        return $results;

    }

```

> 
> This is my controller
> 
> 
> 

```
public function linechart(){
    $result = $this->linechart->get_archive_links();
    $data['chart_data'] = $result['chart_data'];
    $this->load->view('linechart', $data);
}

```

> 
> I am getting this
> 
> 
> 

```

2016-01-01 02:20:36.000000

```

> 
> I need this
>  2016-jan-1
> 
> 
>