note 40868 added to function.strftime
| From: | cristiane19sp at hotmail dot com | Date: | Wed, 17 Mar 2004 14:51:29 +0000 |
| Subject: | note 40868 added to function.strftime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66964@lists.php.net to get a copy of this message | ||
Tratar data, subtrae e obtem a diferença em dias
<?php
$day=15;//the day of birth variable
$month=03;//the month of birth variable
$year=2004;// the year of birth variable
$day_h=17;//the day of birth variable
$month_h=03;//the month of birth variable
$year_h=2004;// the year of birth variable
$now=mktime(0,0,0,$month_h,$day_h,$year_h);
$timebirth=mktime(0,0,0,$month,$day,$year);
echo $agetime=$now-$timebirth.'<br>';
echo $agetime/3600/24;
Resultado eh 2 dias.
?>
----
Manual Page -- http://www.php.net/manual/en/function.strftime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40868
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40868&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40868&report=yes
Search -- http://master.php.net/manage/user-notes.php