I am confused about filtering fields like created_at or updated_at in GridView. Yii2 suggests to use unix timestamp saved into integer field in MySQL database. It's all fine but how can I filter those values? If I want to filter only date - do I have to add sth like the following to the search method?
$query->andFilterWhere([
'DATE(FROM_UNIXTIME('.$this->tableName() . '.created_at))' => $this->created_at]);
Or use FROM_UNIXTIME with specific format? Sure it can be done like that but comparing the field means converting all values to date and then compare.
Am I doing it wrong?
$this->created_at? Is that also a unix timestamp?