![]() Topic awaiting preservation: PHP: calculating age from DoB. (Page 1 of 1) |
|
|---|---|
|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 02-04-2006 11:17
|
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 02-04-2006 14:29
of course not, both are strings - and you'd skip days on leap years and such. |
|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 02-04-2006 14:56
thanks TP, code: $age = strtotime(date("Y-m-d")) - strtotime($dob);
$age = round( $age/30758400);
|
|
Lunatic (VI) Inmate From: under the bed |
posted 02-04-2006 17:22
I would do something along the lines of - |
|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 02-04-2006 17:27
that is also a good idea. i will try that. |
|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 02-04-2006 17:41
|
|
Paranoid (IV) Inmate From: the dungeons, corridor 13, cell 3736 |
posted 02-04-2006 18:11
|
|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 02-04-2006 18:15
|
|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 02-20-2006 06:06
|
|
Paranoid (IV) Inmate From: Norway |
posted 02-20-2006 09:00
|