note 31477 added to ref.datetime

From: Date: Wed, 23 Apr 2003 13:24:49 +0000
Subject: note 31477 added to ref.datetime
Groups: php.notes 
Request: Send a blank email to php-notes+get-46981@lists.php.net to get a copy of this message
After having some trouble checking deltas between DB-Timestamps and my server time, I use this to convert something like a MySQL-Timestamp(14) to the UNIX format: $Timestamp="20030423145607"; $UnixTimestamp = strtotime (substr_replace (substr (substr ($Timestamp,0,2).chunk_split (substr ($Timestamp,2,6),2,"-").chunk_split (substr ($Timestamp,8),2,":"),0,19)," ",10,1)); ->1051102567 -- http://www.php.net/manual/en/ref.datetime.php http://master.php.net/manage/user-notes.php?action=edit+31477 http://master.php.net/manage/user-notes.php?action=delete+31477 http://master.php.net/manage/user-notes.php?action=reject+31477

« previous php.notes (#46981) next »