note 18994 deleted from function.mktime by hholzgra

From: Date: Sun, 14 Apr 2002 21:55:50 +0000
Subject: note 18994 deleted from function.mktime by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29320@lists.php.net to get a copy of this message
convert a MySQL datetime field to an unix_timestamp // MySQL datetime input returns unix_timestamp function totime($buffer) { $timestamp = mktime(substr($buffer,11,2), substr($buffer,14,2), substr($buffer,17,2), substr($buffer,5,2), substr($buffer,8,2), substr($buffer,0,4)); return($timestamp); } now you can use it in : date("M D Y",totime($result[1]));

« previous php.notes (#29320) next »