I try to use sc_date_dif and sc_date_dif_2 to calculate {age}.
first, i create new text field name ‘age’ and i have {birthDate} field.
then event onload
$current_date=date('Y-m-d');
{age}=sc_date_dif($current_date, 'aaaa-mm-dd', {birthDate}, 'aaaa-mm-dd'};
when run the form why {age} field return days and years number like ‘#### ##’
is days
is years
then i try to use sc_date_dif_2 but it can’t use {age} as an array, return variables error in yellow box when run the form.