note 24136 added to function.strtotime
| From: | lists at darkcore dot net | Date: | Wed, 07 Aug 2002 16:56:00 +0000 |
| Subject: | note 24136 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34462@lists.php.net to get a copy of this message | ||
As noted by others, strtotime won't work with PostgreSQL dates because of the floating point
seconds.
Here is a simple work around.
$var = "2002-08-02 15:09:18.41114-05";
$datetime = substr($var, 0, strpos($var, "."));
print(strtotime($datetime));
--
http://www.php.net/manual/en/function.strtotime.php
http://master.php.net/manage/user-notes.php?action=edit+24136
http://master.php.net/manage/user-notes.php?action=delete+24136
http://master.php.net/manage/user-notes.php?action=reject+24136