'Calculating AGE in completed in SAS

I have a date of birth variable in my dataset, however, the reference date 2FEB2022 is not in the dataset and I would like to calculate age. How do you calculate age in completed years?

sas


Solution 1:[1]

It'll be something like this, although I haven't got SAS in front of me to test so I may have got the syntax slightly wrong:

AGE=INTCK('YEAR',DateOfBirth,'02FEB2022'd,'C');

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rick Paddock