note 20540 added to function.strtotime
| From: | samuele at artemisnetwork dot com | Date: | Sun, 07 Apr 2002 10:40:35 +0000 |
| Subject: | note 20540 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28808@lists.php.net to get a copy of this message | ||
If you have a timestamp(8) field in a MySql table (an integer having a YYYYMMDD format), you may
need to convert it in a Unix timestamp format.
This may be useful:
function ts8totime ($ts) {
return mktime(0,0,0,substr($ts,4,2),substr($ts,6,2),substr($ts,0,4));
}
--
http://www.php.net/manual/en/function.strtotime.php
http://master.php.net/manage/user-notes.php?action=edit+20540
http://master.php.net/manage/user-notes.php?action=delete+20540
http://master.php.net/manage/user-notes.php?action=reject+20540