note 23665 added to function.mktime

From: Date: Wed, 24 Jul 2002 14:33:13 +0000
Subject: note 23665 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-33502@lists.php.net to get a copy of this message
Thanks to kris for his function unixTimeStampFromSQLDateTime, but it could be realized by regexp split which saves our time & fingers and doing the same. =) function unixTimeStampFromSQLDateTime($strSQLDateTime){ $ts = preg_split ("/[\s\-:]+/", $strSQLDateTime); return mktime($ts[3], $ts[4], $ts[5], $ts[1], $ts[2], $ts[0]); } -- http://www.php.net/manual/en/function.mktime.php http://master.php.net/manage/user-notes.php?action=edit+23665 http://master.php.net/manage/user-notes.php?action=delete+23665 http://master.php.net/manage/user-notes.php?action=reject+23665

« previous php.notes (#33502) next »