note 8525 deleted from function.date by jimw

From: Date: Fri, 02 Nov 2001 00:41:44 +0000
Subject: note 8525 deleted from function.date by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20051@lists.php.net to get a copy of this message
[Editor's note: this function is irrelevant for MySQL, as it has the UNIX_TIMESTAMP() function (read the MySQL manual for more information), but it could be useful for other databases] Another note for users trying to use a TIMESTAMP field in mySQL and the date function. I wrote a small function to convert from mySQL's TIMESTAMP to a UNIX timestamp (compatible with the date() function). function sql_to_unix_time($timeString) { return mktime(substr($timeString, 8,2), substr($timeString, 10,2), substr($timeString, 12,2), substr($timeString, 4,2), substr($timeString, 6,2), substr($timeString, 0,4)); }

« previous php.notes (#20051) next »