$result = mysql_query("SELECT `datetime` FROM `table`");
$row = mysql_fetch_row($result);
$date = date_create($row[0]);
echo date_format($date, 'Y-m-d H:i:s');
echo date_format($date, 'd/m/Y H:i:s');
echo date_format($date, 'd/m/y');
echo date_format($date, 'g:i A');
echo date_format($date, 'G:ia');
echo date_format($date, 'g:ia \o\n l jS F Y');
No comments:
Post a Comment