RE: [PHP] Getting age from yyyy-mm-dd
| From: | Chris W. Parker | Date: | Wed, 18 Feb 2004 17:12:10 +0000 |
| Subject: | RE: [PHP] Getting age from yyyy-mm-dd | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178137@lists.php.net to get a copy of this message | ||
Ryan A <mailto:ryan@coinpass.com>
on Wednesday, February 18, 2004 8:19 AM said:
> I think I will need to use mktime....but how??
>
> Any help appreciated, in URL form, hints or PHP manual references.
well i think the idea is to convert the date/time of the person's
birthday into a unix timestamp and then subtract that from the current
date/time. then you can convert the difference back into a readable
format.
i think the unix timestamp is in seconds??? so if you end up with 5000
as the difference you can...
5000/60 = $minutes
$minutes/60 = $hours
$hours/24 = $days
etc.
hthaihinw*,
chris.
* Hope This Helps And I Hope I'm Not Wrong :)