note 28873 deleted from function.date by sniper
| From: | sniper@php.net | Date: | Sat, 11 Oct 2003 16:52:00 +0000 |
| Subject: | note 28873 deleted from function.date by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58277@lists.php.net to get a copy of this message | ||
Note Submitter: Jester@free2code.net
----
I find when storing dates in a database it is best to store the UNIX timestamp instead of using the
databases' silly date functions that are specific to that particular database. You can use the
UNIX time stamp to show the date however you wish when you extract the time from the database.
echo date('D M d, Y - H:i:s', $from_db->time);
This also allows you to change the format the date displays in without messing with the database.