Re: Time problem
| From: | Chris Shiflett | Date: | Wed, 12 Nov 2003 00:18:15 +0000 |
| Subject: | Re: Time problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169216@lists.php.net to get a copy of this message | ||
--- Erin <xp@cookra.co.uk> wrote:
> How do i convert a timestamp in to a normal readable time & date ie
>
> 20031111155023
>
> into
>
> 11th November 2003 @ 15:50:23
That's not a timestamp, first of all. It looks to me like you just need to
use substr() to parse out the elements however you want. You can see if
strtotime() can do anything with it, but I doubt it.
If you want to convert it to a real timestamp, look at the mktime()
function. Once you have a timestamp, it's very easy to work with, and you
can use date() to format it however you want.
Hope that helps.
Chris
=====
My Blog
http://shiflett.org/
HTTP Developer's Handbook
http://httphandbook.org/
RAMP Training Courses
http://www.nyphp.org/ramp