Skip to content

Instantly share code, notes, and snippets.

@cherihung
Created March 19, 2013 16:31
Show Gist options
  • Save cherihung/5197647 to your computer and use it in GitHub Desktop.
Save cherihung/5197647 to your computer and use it in GitHub Desktop.
convert date in english date format (YYYY-MM-DD) into another specified format
function convert_eng_date($date, $format) {
$return = date($format, strtotime($date));
return $return;
}
$newdate = convert_eng_date($olddate, "M. d, Y"); //format = Feb. 12, 2013
echo $newdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment