note 8830 added to gmdate
| From: | rubein at earthlink dot net | Date: | Fri, 29 Sep 2000 20:41:49 +0000 |
| Subject: | note 8830 added to gmdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5683@lists.php.net to get a copy of this message | ||
To the above comment: 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