note 9217 added to strtotime

From: Date: Mon, 23 Oct 2000 16:57:36 +0000
Subject: note 9217 added to strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-6935@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 http://www.php.net/manual/function.strtotime.php

« previous php.notes (#6935) next »