note 23665 deleted from function.mktime by dams
| From: | dams@php.net | Date: | Sat, 27 Jul 2002 13:02:09 +0000 |
| Subject: | note 23665 deleted from function.mktime by dams | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-33630@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]);
}