note 46191 deleted from function.date by betz
| From: | betz@php.net | Date: | Fri, 01 Oct 2004 20:25:07 +0000 |
| Subject: | note 46191 deleted from function.date by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77703@lists.php.net to get a copy of this message | ||
Note Submitter: Baldurien at club-internet dot fr
----
In addition to rafaelr at veloxmail dot com dot br :
If you use mySQL, then do it in SQL :
1. If you use a TIMESTAMP, or any DATETIME fields just use this (see http://dev.mysql.com/doc/mysql/en/DATETIME.html
)
SELECT UNIX_TIMESTAMP(field) AS field
FROM table
or better use DATE_FORMAT (http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html ), I think
it use the same format as strftime (http://fr.php.net/manual/fr/function.strftime.php ) do.