how I can get datetime from database but without hours and minutes? Format in database e.g 2016-03-28 15:55:00 I would like get this record in ActiveRecord. Can you show simple example?
how I can get datetime from database but without hours and minutes? Format in database e.g 2016-03-28 15:55:00 I would like get this record in ActiveRecord. Can you show simple example?
$query = new Query;
$query->select("DATE_FORMAT(date_field,'%Y-%m-%d')")->from("table_name");
$rows = $query->all();
Something like this ? Hope it helps
I used AR and …
$MovieData = seanse::find()->select(['date(data)'])->innerJoinWith(['idMovie', 'idRoom']
)->where(['active' => 'active'])->andWhere(['date(data)' => $date])->groupBy('name');
working