【发布时间】:2016-04-12 13:02:59
【问题描述】:
有什么方法可以将mysql数据库日期字段转换为查询本身中的strtotime之类的时间戳?
我的代码:
$this->db->where('effectdate >= ',$start_date);
$this->db->where('effectdate <= ',$end_date);
$query = $this->db->get();
$start_date 和 $end_date 是时间戳值,但数据库值是正常日期。这些无论如何都可以将日期转换为时间戳? 请帮忙。
【问题讨论】:
-
感谢回复,请问有什么办法可以查询本身吗?
-
post
$start_date格式.. 它是这样的:1222093324 -
你说的
query itself是什么意思?? -
@youv
effectdate格式怎么样? -
然后将
$start_date和$end_date转换成“Y-m-d”格式
标签: codeigniter