Re: Timestamps
| From: | Patrick Meisel | Date: | Tue, 20 Jun 2000 23:03:07 +0000 |
| Subject: | Re: Timestamps | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2395@lists.php.net to get a copy of this message | ||
Hi,
Even easier: SELECT UNIX_TIMESTAMP(your_time_col)
Patrick Meisel
> >Hello,
> >I need to convert a mysql timestamp (200006210000) to a unix timestamp
> >(seconds from 1970), anyone know how to do it?
>
> Hi Simon,
> Use substr or ereg to convert the timestamp into separate figures for year,
> month, day, etc...
>
> Use mktime to convert the year, month, day, etc.. figures into a unix
> timestamp.
>
> HTH,
> Zak Greant
> Creative Director
> Nucleus Information Service Inc.
>
> "A camel is a horse designed by a committee."
> - Alex Issigonis (Designer of the Morris Mini)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net