Support

Account

Home Forums ACF PRO Age calculation ouput Reply To: Age calculation ouput

  • You don’t need a separate age field. You can do the calculation in the theme itself. Something like:

    <?php $DOB = get_field('date_of_birth'); // change for field name
    $birthday = new DateTime($DOB);
    $dateDiff = $birthday->diff(new DateTime);
    echo $dateDiff->y.' years old';
    ?>