Answers for "how to convert string date in date format in php"

PHP
7

php convert string to date

$time = strtotime('10/16/2003');

$newformat = date('Y-m-d',$time);

echo $newformat;
// 2003-10-16
Posted by: Guest on February-28-2020

Code answers related to "how to convert string date in date format in php"

Browse Popular Code Answers by Language