Andy,

> So what is the proper function in PHP to convert the MySQL timestamp
into a
> proper format like Sonday, Apr. 20th 2002?

SELECT from SQL using UNIX_TIMESTAMP()

Format for presentation in PHP using: string date ( string format [, int
timestamp])

Regards,
=dn


> > > I am playing around with the timestamp functions. I created a
timestamp
> > > with mysql ( the row is timestamp)
> > > and do reformat this thing after selecting with php in the
folowíng way:
> > >
> > >  $date_posted[$i] = strftime("%A, %d-%m-%Y %R", $date_posted[$i]);
> > >
> > > This always returns Tuesday, 19-01-2038 but the mysql timestamp
says:
> > > 20020305211704
> >
> > They return the time in different formats. Read the MySQL manual
then read
> > the PHP manual (or vice-versa).
> >
> > The MySQL timestamp is human readable. So in your example above:
> >
> > 20020305211704 ==> 2002-03-05 21:17:04
> >
> > time() in PHP is the number of seconds since the Unix Epoch.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to