Select query with Date of Today not working Select query with Date of Today not working codeigniter codeigniter

Select query with Date of Today not working


Try this

<?php $date = new DateTime("now"); $curr_date = $date->format('Y-m-d '); $this->db->select('*'); $this->db->from('documents');  $this->db->where('DATE(Date)',$curr_date);//use date function $query = $this->db->get();    return $query->result();

MySQL date Function