Created a model with a dateTime field called 'until', the name is not important just that it is a date time.
Here is it's validation in the rules of the model.
['until', 'datetime', 'format' => 'Y-m-d H:i:s'],
$model->until = '2017-10-15 14:30:04';
$errors = $model->errors;
As in Yii2 Doc
format: the date/time format that the value being validated should be in. This can be a date time pattern as described in the ICU manual. Alternatively this can be a string prefixed with
php:representing a format that can be recognized by the PHP Datetime class.
['until', 'datetime', 'format' => 'php:Y-m-d H:i:s'],