- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$dates = array(
'2014-03-18',
'18/03/2014',
'2014-03-18 12:34:56',
'18/03/2014 12:34:56',
);
foreach ($dates as $date) {
echo date('Y-m-d H:i:s', strtotime($date))."<br />";
}