Answer the question
In order to leave comments, you need to log in
How to convert the date to strtotime format when sending it to the database?
I don't understand a little that when you use input type="datetime". Then when you save to the database, translate not the date, but the number of seconds elapsed.
I don’t understand exactly how only the date from the post request is taken in the controller and converted to another format
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question