note 28845 added to function.time
| From: | jroberts at forumone dot com | Date: | Sat, 25 Jan 2003 19:11:35 +0000 |
| Subject: | note 28845 added to function.time | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42739@lists.php.net to get a copy of this message | ||
Looks to me like most of the example scripts on this page could better be accomplished by built-in
PHP functions
strtotime() (turns a string such as a MySQL datestamp into a UNIX timestamp)
date() accepts a UNIX datestamp (optional) and lets you provide a formatting string to meet almost
any need
additionally, the MySQL command DATE_FORMAT() would let you convert MySQL datestamps to pretty much
any format as you pull them from the DB.
--
http://www.php.net/manual/en/function.time.php
http://master.php.net/manage/user-notes.php?action=edit+28845
http://master.php.net/manage/user-notes.php?action=delete+28845
http://master.php.net/manage/user-notes.php?action=reject+28845