This seems like the best way to calculate the time/date differences - using PHP's interval calculations...
function callback_col($value, $row) { $date1 = new DateTime("now"); $date2 = new DateTime($row->dob); $interval = $date1->diff($date2); error_log( "difference " . $interval->y . " years, " . $interval->m." months, ".$interval->d." days "); return $interval->y; }
hi dale ! thank's for the solution. it really accurate even in day calculate :D