Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

DATE_FORMAT in CodeIgniter

by
Category:codeigniter
codeigniter mysql
DATE_FORMAT in CodeIgniter

The date_format() function returns a date formatted according to the specified format.

Let’s create a date_format() in where condition using codeigniter.

if(!empty($this->input->get('start_date')))
{
	$this->db->where('DATE_FORMAT(products.created_datetime,"%Y-%m-%d") >=',
		date('Y-m-d',strtotime($this->input->get('start_date'))));
}

0 Comments


Html code work in comment box


Related Post