Created
October 2, 2012 08:35
-
-
Save snowman-repos/3817367 to your computer and use it in GitHub Desktop.
PHP: Change Date from ddmmyyyy to yyyymmdd
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
$date_array = explode("/",$date); // split the array | |
$var_day = $date_array[0]; //day seqment | |
$var_month = $date_array[1]; //month segment | |
$var_year = $date_array[2]; //year segment | |
$new_date_format = "$var_year-$var_day-$var_month"; // join them together |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment