format date in php

32

format date in php -

$myDateTime = DateTime::createFromFormat('Y-m-d', $dateString);
$newDateString = $myDateTime->format('d-m-Y');

Comments

Submit
0 Comments