note 10091 added to Date and Time functions
| From: | fancao0515 at 0451 dot com | Date: | Wed, 13 Dec 2000 01:19:10 +0000 |
| Subject: | note 10091 added to Date and Time functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8661@lists.php.net to get a copy of this message | ||
You can use Mysql function:
<?
$data_time="1998-12-31 23:59:59";
$connect_id=mysql_connect('localhost');
$query_id=mysql_query("SELECT DATE_ADD('$data_time',INTERVAL 1
YEAR)",$connect_id);
$data_time=mysql_result($query_id,0);
mysql_close($connect_id);
echo $data_time;
?>
http://www.php.net/manual/ref.datetime.php