Not sure how others would tackle this, but I would use something like
$readabledate = date("dS F Y @ H:i:s",
strtotime(substr($timestamp,0,4)."-"
.substr($timestamp,4,2)."-"
.substr($timestamp,6,2)." "
.substr($timestamp,8,2).":"
.substr($timestamp,10,2).":"
.substr($timestamp,12,2)));
Not sure this is bug free, but it should change your timestamp (yes it is a
database timestamp) into the readable format you described. It's yours to
debug.
http://www.php.net/manual/en/function.date.php
Good luck,
Warren Vail
-----Original Message-----
From: Erin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 4:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Time problem
Hi All,
Sorry if this has been asked a 1000 times and if its easy to find in the
php manual but i cant seam to solve this.
How do i convert a timestamp in to a normal readable time & date ie
20031111155023
into
11th November 2003 @ 15:50:23
Many thanks, thought id ask someone is bound to have a snippet for this.
Regards
All
Erin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php