note 16948 added to function.time
| From: | pirre at php2 dot chek dot com | Date: | Tue, 20 Nov 2001 02:03:09 +0000 |
| Subject: | note 16948 added to function.time | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21035@lists.php.net to get a copy of this message | ||
This seems to work very well for converting a special date-string into timestamp:<br>
$date_string = date ("m/d/Y H:i:s");
$date_string = strtotime ($date_string);
echo $date_string."";
echo time();<br>
You actually get the same value. You only have to use the format "mm/dd/yyyy hh:mm:ss".
--
http://www.php.net/manual/en/function.time.php
http://master.php.net/manage/user-notes.php?action=edit+16948
http://master.php.net/manage/user-notes.php?action=delete+16948
http://master.php.net/manage/user-notes.php?action=reject+16948