I have time from date picker that looks like this: 2017-12-10T14:40:18.492Z. I tried to use the code below in Laravel to convert it to MySQL date format but it is throwing up error saying that (1/1) FatalThrowableError Class 'iirs_demo\Http\Controllers\DateTime' not found
<?php $date = new DateTime('2000-01-01'); echo $date->format('Y-m-d H:i:s'); ?>
Please, how do I resolve it?
Thanks.