Calculating the age of a person...
Hi all!
I have a table (mySQL) which is filled with member-information. One field in this table is the birthdate of a person in yyyy-mm-dd format. I converted this date to a unix-timestamp and calculated the difference to the timestamp of today.
But there's a problem...
A member who had been born before the 1st of January in 1970 has no age... :(
Infact PHP doesn't allow a timestamp to be negative... So what do I have to do? Should I forbid persons born before 1970 to become members?? :rolleyes:
The algorithm should be programmed in PHP (4).
Thanks in advance,
dmr.