note 16949 added to function.strtotime

From: Date: Tue, 20 Nov 2001 02:11:46 +0000
Subject: note 16949 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-21036@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". So, now you can use something like: $date_string = date ("m/d/Y 20:30:00"); to check for example something every night at 20:30. ;o) -- http://www.php.net/manual/en/function.strtotime.php http://master.php.net/manage/user-notes.php?action=edit+16949 http://master.php.net/manage/user-notes.php?action=delete+16949 http://master.php.net/manage/user-notes.php?action=reject+16949

« previous php.notes (#21036) next »