日期区间控制

if($startTime){
            $startTime=$startTime.' 00:00:00.000';
            if($endTime){
				$endTime=$endTime.' 23:59:59.000';
                $condition .= " call_date BETWEEN '".$startTime."' AND '".$endTime."'  " ;
            }else{
                $condition .= " call_date BETWEEN '".$startTime."' AND CURDATE()  " ;
            }
        }else{
            $condition .= " call_date <  CURDATE()  " ;
        }

随机浏览