Re: Timestamps
| From: | Zak Greant | Date: | Tue, 20 Jun 2000 22:53:53 +0000 |
| Subject: | Re: Timestamps | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2393@lists.php.net to get a copy of this message | ||
At 12:50 AM 6/21/00 +0200, Simon Berg wrote:
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)