SELECT to_char(events.date_start, 'MM') AS month_start
FROM "events"
WHERE "event_id"=13;
Event::find()->select('to_char(events.date_start, \'MM\') AS month_start)->where(["event_id"=>13])->one()
ОШИБКА: ошибка синтаксиса (примерное положение: \"AS\")\nLINE 1: to_char(events.date_start, \"'MM')\" As
$expression = new Expression('NOW()');
$now = (new \yii\db\Query)->select($expression)->scalar(); // SELECT NOW();
echo $now; // prints the current date