1
2<?php
3$date = new DateTime('2000-01-01');
4echo $date->format('Y-m-d H:i:s');
5?>
6
7
1<?php
2$date = '27/06/2020, 04:42:43 PM';
3$date = str_replace('/', '-', $date);
4echo date('F j, Y, g:i a',strtotime($date));
5
6// output : June 27, 2020, 4:42 pm
7?>