Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php calculate age as float

$birthDate = new DateTime('2020-6-12'); // Your date of birth
$todayDate = new Datetime(date('m.d.y'));
$Age = $todayDate->diff($birthDate);
$Age = $Age->y + $Age->m/12; 
// reslut will be somthing like this:13.7
 
PREVIOUS NEXT
Tagged: #php #calculate #age #float
ADD COMMENT
Topic
Name
8+1 =