difference between two dates
| From: | Rajesh Fowkar | Date: | Sun, 19 Jan 2003 15:16:11 +0000 |
| Subject: | difference between two dates | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24946@lists.php.net to get a copy of this message | ||
Hello,
In my application I am accepting Day, Month and Year from a Select List.
What I want to do is calculate the age of the person based on the above
selection.
$cboDD is the day variable
$cboMM is the month variable
$cboYY is the year variable
I tried this :
$dobtimestamp = mktime(0,0,0,$cboMM,$cboDD,$cboYY);
$todaytimestamp = time();
$txtAge = ($todaytimestamp - $dobtimestamp)/86400;
It does not give me the expected output.
Can anybody suggest something ?
Thanks in advance.
Peace
--
Rajesh * rajesh-shriram@gmx.net * http://www.symonds.net/~rajesh/
Powered By : Debian GNU/Linux 3.0 (Woody) - [Kernel 2.4.18(ext3),Mutt 1.5.1i]
What we anticipate seldom occurs; what we least expect generally happens.
-- Bengamin Disraeli