05-30-2017 09:15 AM
when I use this function it give error message me invalid agrgument
NOTE: Invalid argument to function YRDIF(13371,.,'ACTUAL') at line 770 column 11.
05-30-2017 09:37 AM
Are you sure that taper_d is a datetime variable and not just a date variable? This is one reason why we always ask for test data in the form of a datastep, if we can see the data and the structure, then we can imediately say wether it is that or not, now we have to have this back and forth, is the variable numeric, is it a date varaible, does it have non-missing data etc.
05-30-2017 10:48 AM
NOTE: Invalid argument to function YRDIF( ,18148,'ACTUAL') at line 12375 column 34.
NOTE: Invalid argument to function YRDIF( ,18189,'actual') at line 12378 column 30.
also I find the data stored the numaric missing as blnk not as .
05-30-2017 10:51 AM
Please post test data in the form of a datastep!!
We have now gone back and forward several times purely because I can't see the data. It now seems your saying that DOB is a character variable not numeric. If so then you need to convert it to numeric, and also add into the logic if <date1> is not missing and <date2> is not missing.
05-30-2017 10:09 AM
This would be a normal result if the variable TAPER_D occasionally takes on a missing value. For those observations, there's no way to compute TAPER_A.
It's not clear whether using DATEPART is the correct step or not, but it is not causing missing values for TAPER_A.