note 26585 added to function.mktime

From: Date: Wed, 06 Nov 2002 00:24:48 +0000
Subject: note 26585 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-39012@lists.php.net to get a copy of this message
How do I create a "normal" looking timestamp, convert it to UNIX-time, and back... (What any self-respecting mySQL/PHP code-head needs to know): ## produces a timestamp that looks like "YYYY-MM-DD 24:00:00": $formated_datetime = date("Y-m-d H:i:s"); ## takes $formated_datetime and converts to "UNIX timestamp": $unix_timestamp = strtotime($formated_datetime); ## converts $unix_timestamp to "normal" formated_datetime: $formated_datetime = date("Y-m-d H:i:s",$unix_timestamp); love and light, shea -- http://www.php.net/manual/en/function.mktime.php http://master.php.net/manage/user-notes.php?action=edit+26585 http://master.php.net/manage/user-notes.php?action=delete+26585 http://master.php.net/manage/user-notes.php?action=reject+26585

« previous php.notes (#39012) next »