This one time, at band camp,
Robert Maurency <[EMAIL PROTECTED]> wrote:

 
> Is there a neat php way to format a value like this 20030320085056 into
> something readable for us mortals?

sure, many ways, are you getting this timestamp from MySQL?

if so, you can do some funky stuff when SELECTing from the db.
SELECT DATE_FORMAT(yourdatecolumn,'%m-%d-%Y %h:%i %p')
you can add what ever format you like using %Y or %y etc

If you have done something like SELECT * FROM table and have a timestamp 
you can do something like
$timestamp = '20030320085056';
echo date("l dS of F Y h:i a", $timestamp);

check out all the fun at
http://www.php.net/manual/en/function.date.php

Kevin

 ______                              
(_____ \                             
 _____) )  ____   ____   ____   ____ 
|  ____/  / _  ) / _  | / ___) / _  )
| |      ( (/ / ( ( | |( (___ ( (/ / 
|_|       \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to