note 6895 modified in function.mktime by irc-html

From: Date: Fri, 18 Jan 2002 14:11:12 +0000
Subject: note 6895 modified in function.mktime by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25032@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. --was-- 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:<br><br> $date = $row["date"];<br> $new_date = date("l, j M Y, G:i:s", strtotime($date));<br><br> So you first convert the DATETIME string to a time and then format that time with the date() function. http://www.php.net/manual/en/function.mktime.php

« previous php.notes (#25032) next »