How to share saved data from 2 different input fields
You can use this code to compute age from date field:

    //compute age
    $bdayunix = strtotime($data-&gt;node_data_field_role_field_birthdate_value);
    $nowunix = time();
    $unixage = $nowunix - $bdayunix;
    $age = floor($unixage/ (365 * 24 * 60 * 60));

    print $age;


I hope these links will also help you solving your problem:


https://www.drupal.org/node/149237
http://www.kadimi.com/en/age-from-date-of-birth-in-drupal-7