note 6895 deleted from function.mktime by hholzgra

From: Date: Sun, 14 Apr 2002 22:13:59 +0000
Subject: note 6895 deleted from function.mktime by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29337@lists.php.net to get a copy of this message
If you have a MySQL column with of the DATETIME type, and you want to format the values to a different representation, use this code: $date = $row["date"]; $new_date = date("l, j M Y, G:i:s", strtotime($date)); So you first convert the DATETIME string to a time and then format that time with the date() function.

« previous php.notes (#29337) next »