tryin
0
Q:

php date strtotime format

PHP date_format() Function

Example
Return a new DateTime object, and then format the date:

<?php

 $date=date_create("2020-03-09");
echo date_format($date,"Y/m/d H:i:s");
?>
 
9
$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));
1
$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));
0

New to Communities?

Join the community