note 8830 modified in gmdate by ronabop
| From: | ronabop@php.net | Date: | Mon, 02 Oct 2000 11:51:35 +0000 |
| Subject: | note 8830 modified in gmdate by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5947@lists.php.net to get a copy of this message | ||
You could easily convert dd/mm/yyyy to mm/dd/yyyy and back with something like this: (Mind you, this
isn't the most efficient code and I didn't test it, but it should work) -- Also, this only
works if your date separator is '/', but will work with both 2 and 4 digit years.
$somedate = explode("/", $european_date);
$newdate[0] = $somedate[1];
$newdate[1] = $somedate[0];
$newdate[2] = $somedate[2];
$american_date = implode("/", $newdate);
http://www.php.net/manual/function.gmdate.php