Hi !
I have a litle problem.
I have on my form four field. In first I have a birthdays in format d-m-Y(12-03-1994). Second field calculatig age from birthday until now ,formated Y-m-d (29-04-10 for example), and have a code :
$start_date = '{yourtable___yourdate}';
if (!empty($start_date)) {
$now_date = new DateTime();
$start_date = new DateTime($start_date);
$since_start = $start_date->diff($now_date);
return $since_start->format('%y-%m-%d');
}
else {
return "no data";
}
and work fine .
PROBLEM IS : In third field have another age in format Y-m-d for example 13-05-16 , and want summ with second field. (29-04-10 + 13-05-16 = 42-09-26)
The summ of calculating 42-09-26 (Y-m-d) must be displayed in fourth field ,but how.😕