Calculate age from date of birth?

Hi,

I want to updating age from date of birth after each updating, can you help me ?

I found this : calculate age in years simply

  1. First, preview of my form :

  1. Add Ajax event :

  1. So now, which code to use?

Thanks

Too simple !!

$today=date(‘Y-m-d’);
$differences = sc_date_dif_2 ({naissance}, “yyyy-mm-dd”, $today, “yyyy-mm-dd”, 2);
{age} = $differences[2];