note 17380 deleted from function.substr by jimw
| From: | jimw@php.net | Date: | Thu, 20 Dec 2001 21:28:51 +0000 |
| Subject: | note 17380 deleted from function.substr by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23451@lists.php.net to get a copy of this message | ||
If you want to convert a mysql timestamp to a normal date format,
you can use the following function:
function timestamp_convert($timestamp)
{
$year = substr($timestamp, 0, 4);
$month = substr($timestamp, 4, 2);
$day = substr($timestamp, 6, 2);
$new_date = $year."-".$month."-".$day;
return $newdate;
}