Symfony Datetime Now

[Solved] Symfony Datetime Now | Php Frameworks Symfony - Code Explorer | yomemimo.com
Question : symfony get current datetime

Answered by : ankur-prajapati

$time = new \DateTime();
echo $time->format('H:i:s \O\n Y-m-d');

Source : https://stackoverflow.com/questions/16442634/set-variable-to-the-current-time-and-date-symfony2 | Last Update : Mon, 11 Oct 21

Question : symfony datetime now

Answered by : belaid-nacereddine

$date = new \DateTime('@'.strtotime('now'));

Source : https://thecodeteacher.com/ | Last Update : Thu, 30 Dec 21

Question : symfony get current datetime

Answered by : ankur-prajapati

$time = date('H:i:s \O\n d/m/Y');

Source : https://stackoverflow.com/questions/16442634/set-variable-to-the-current-time-and-date-symfony2 | Last Update : Mon, 11 Oct 21

Answers related to symfony datetime now

Code Explorer Popular Question For Php Frameworks Symfony