Created
March 19, 2013 16:31
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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