Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想比较 QueryBuilder 上的两个日期时间字段,但首先我需要将日期时间格式 (YYYY-MM-DD HH:MM:SS) 转换为日期(YYYY-MM-DD)
如何在 queryBuilder 上执行此操作?
.... WHERE (datetime)::date = datecompare ...
$yourDate = "2013-10-13 22:22:22"; $users = DB::table('users')->where('date', ">", date("Y-m-d", strtotime($yourDate)))->get();