Skip to content

Instantly share code, notes, and snippets.

@jordanandree
Created December 27, 2010 23:23
Show Gist options
  • Save jordanandree/756694 to your computer and use it in GitHub Desktop.
Save jordanandree/756694 to your computer and use it in GitHub Desktop.
<?php
function datetimeFormat( $date, $format )
{
$date = explode('-', $date);
$day = explode(' ', $date[2]);
$time = explode(':', $day[1]);
$day = $day[0];
$mktime = mktime($time[0] , $time[1], $time[2], $date[1], $day, $date[0]);
return date($format, $mktime);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment