Convert from MySQL datetime to another format with PHP

// $datetime is something like: 2014-01-31 13:05:59
$time = strtotime($datetimeFromMysql);
$myFormatForView = date("d-m-Y g:i A", $time);
// $myFormatForView is something like: 01/31/14 1:05 PM

Comments

Popular posts from this blog

Set limit wp_nav_menu

Conut document have children that are show in navigation