curdate函数如何以mm/dd/yyyy格式返回日期php [英] how curdate function could return date in mm/dd/yyyy format php
本文介绍了curdate函数如何以mm/dd/yyyy格式返回日期php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从数据库中以mm/dd/yyyy格式选择当前日期.但是php curdate()函数默认以yyyy-mm-dd返回日期格式.如何解决此问题.?
I need to select current date from database in mm/dd/yyyy format..But php curdate() function returns date format in yyyy-mm-dd as default..How could I resolve this issue.?
我的模型函数是:
public function get_cat($category)
{
$this->db->select('*');
if($category!='')
{
$this->db->like('Category',$category,'both');
$this->db->from('tbl_job');
$this->db->where('Expiry_date >=','DATE(CURDATE())',FALSE);
$result = $this->db->get();
}
return $result->result();
}
推荐答案
使用 查看全文