Age from birthdate?
| From: | DvDmanDT | Date: | Wed, 22 Oct 2003 16:31:21 +0000 |
| Subject: | Age from birthdate? | ||
| Groups: | php.general php.windows | ||
| Request: | Send a blank email to php-general+get-167112@lists.php.net to get a copy of this message | ||
How would I get the age of someone if I store the birthdate in a date field?
I just realized FLOOR((UNIX_TIMESTAMP(NOW()) -
UNIX_TIMESTAMP(birthdate))/60/60/24/365.25) wont work for persons born
before 1970... :p I must get the current age in years, and I must be able to
select by age... :p Any ideas?
--
// DvDmanDT
MSN: dvdmandt@hotmail.com
Mail: dvdmandt@telia.com