I don't see a problem in this very small test:
data abc;
input (dob date_01) (yymmdd10.);
age=int(yrdif(dob,date_01,'AGE'));
datalines;
1955-01-01 2025-08-15
;
Format of the variables is irrelevant. Negative dates are irrelevant. If the dates are truly dates, then YEARCUTOFF= should be irrelevant.
Please provide the full data step or full SQL code, not a fraction of a line of code as in your original message. Also, if there are WARNINGS or ERRORs in the log, please show us the log for this data step or SQL (and not just the lines with the WARNINGs or ERRORs, we need to see the full log for this data step or SQL.)
Please provide a small sample of data that includes dates before and after 01JAN1960. Best would be if the dates are UNformatted (yes UNFORMATTED). Please provide the data as DATA step code, according to these examples and instructions as I have done above; or I think this short program will work as well in this situation on a small subset of the data with dates before and after 01JAN1960. Do not provide the data via COPY/PASTE from Excel, do not provide the data as an Excel file.
proc print data=abc; /* Use your real data set name here */
var dob date_01 age;
format dob date_01; /* Unformatted */
run;
... View more