note 9217 deleted from function.strtotime by jimw
| From: | jimw@php.net | Date: | Fri, 14 Dec 2001 20:56:14 +0000 |
| Subject: | note 9217 deleted from function.strtotime by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22790@lists.php.net to get a copy of this message | ||
Another idea for converting dates to acceptable format by strtotime():
ereg_replace('([0-9]*)\.([0-9]*)\.([0-9]*)','\2/\1/\3', $s)
This converts "31.12.2000 12:30:10" format dates to a format that strtotime() understands.
ereg_replace('([0-9]*)-([0-9]*)-([0-9]*)','\2/\3/\1', $s)
This would convert 2000-12-31 to 12/31/2000. (And include possible timestamp after it.)
--
Somebody called Joel