YII2 find value from db between a range $match_batches = Batches :: find () -> andFilterWhere ( [ '>' , 'start_date' , $temp_date_range_start ] ) -> andFilterWhere ( [ '<' , 'end_date' , $temp_date_range_end ] ) -> one ();