Calculate Contact age in a Drupal view
In your view, pull in the CiviCRM birth date field.
Under date format, select Time ago.
This will present the D.O.B. field as 40 years 7 months



To remove years and months from the output you can ‘Rewrite results’ in the view and ‘Trim this field to a maximum length’ and set ‘Maximum length’ to 2 characters