Streaming Analytics. As would be generally appropriate, the YRDIF function does not include the last day of the interval (the date of the second argument) when counting the total number of days. - With all due respect if you think your SAS training course content should align exactly with real world usefulness then I think you are bound to beView Code_ Group12_Ws4. 07, and the ratio of interest to principal is 83. When calculating the age of a person or event, 'AGE' should be used as the basis. 0). If your data contain both positive and negative values, you can also round numbers toward zero, or away from zero. sql. Python Lambda Function with Examples. . I want to calculate the age of a customer but sas is giving me errors. comYRDIF 209 . Base SAS Utilities. Indeed, I would expect something more like this for January and February: data two; _start='01JAN2017'd; _end='15JAN2017'd; dif=(15*30/31)/360; output;The YRDIF function computes the difference in years between two dates. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. N requires numeric arguments, whereas CMISS works with both numeric and character values. 8. Tables of Perl Regular Expression (PRX) Metacharacters. We'll learn how SAS defines a date value, how to use an informat to read a date into a SAS data set, how to use a format to display a SAS date, how to perform simple date calculations, and how to define a SAS date constant. ) If you really want it to be character. The Python API for Apache Spark is known as PySpark. 16:46 – Example: How to determine time passed between two dates using the YRDIF function. Hello, i want to ask a question about two options of yrdif function : 'ACT/ACT' vs 'AGE' yr_act_act = yrdif(startdate, enddate, 'act/act'); yr_age =. Recommended Reading. FedSQL Statements. You either need to include this information in your connection definition or in your SQL. CALERIE Phase 2 Data handling rules for RMR, TEE and AREE Residuals 4 The Mixed Procedure Model Information Data Set WORK. For an adult study, all of these approaches in calculating Age seem to be ok. 2023. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set Would enabling PROC SORT to. The first two arguments, start-date and end-date, are required. I have an age variable and i need to recode it into categories. Again, the YRDIF (Yrdif_fcn) function and 3 age formulas were programmed: the “standard calculation” (Std_age_calc); the adjusted calculation using the FLOOR function (Adj_form1); and the adjusted calculation using the INTCK function alone (Adj_form2). data temp; x = '12345'; new_x = input (x,5. proc sql; create table temp1 as select *, max(dob) as DOB_ALL from have group by patient_Id order by 1, 2, 3; quit;I guess that depends on how you define the word "easy". The first two arguments, start-date and end-date , are required. put (input (my_birthday,mmddyy10. MDY(10,35,15); D. Security is the primary focus of the Maintenance 8 update. 1. About This Book. explode_outer (col) Returns a new row for each element in the given array or map. DATEPART(. Date1: 09/02/2011. The resulting quality of life data are stored in a permanent SAS data set called qul . This is my data dt_birth dt_death 4/21/1957 4/21/1967 4/21/1965 4/3/1976 I have to create a 3rd column called age. The beauty of these functions is that they automatically handle leap years! If you request the number of days between two dates, the INTCK function includes leap days in the. Auto-call macro functions. = YEARFRAC("Jan 1 2007","Mar 1 2007") Use four-digit years whenever possible, to avoid getting unexpected results. birthday of 02/29/1960, date of 02/27/1965: yrdif gives 4. date1 = year (date): Extracts the year component from the variable date. The yrdob variable is NOT a date variable - it is only numeric and every time I try to make it a date variable so I can use the yrdif function it makes all of the years 1965 instead of recognizing the yrdob as a year, not the number of days after 1960. To show the total payment and the total interest, we use PROC REPORT to generate a summary table as Figure 2. My (likely naive) first idea was to perform a simple substraction as I understood that sas stores dates internally as sas dates. Abstract: yrdif Calculates people's ages from data on their birth date and some "current" daily date. 01JUL1991. The YRDIF function can be used in calculating interest for fixed income securities when the third argument, basis, is present. However, for pediatric studies, different approaches could give quite bit. Eyes and kidneys have numerous structural, developmental, physiologic, and pathogenic pathways in common, suggesting that many kidney and eye diseases may be interlinked. 將原始資料變數拉入右側的選取資料中後,點選. Page 1 of 5 PhUSE 2013 Paper SP09 Lexis Expansion- Age-at-Risk Adjustment for Survival Analysis Lai San Hong, Redsen Limited, Bournemouth, UK Sarah Lewington, CTSU, Nuffield Dept of Population Health, Oxford University, Oxford, UKWhat is a SAS date value? A SAS date value is the number of days between January 1, 1960 and a specified date. Mark as New; Bookmark; Subscribe; Mute; RSS Feed; Permalink; Print; Report Inappropriate Content; Re: INTCK to compute ageAyapparaj / Praxis Business School 8 Chapter 9 Working with Dates Chapter 9 Working with Dates /* 2. format. Table 3. Re: Calculate Age for Missing Values from DOB. ); run; In the above example, the variable x is a character variable as it is defined in quotes '12345'. act/act基準を使用するyrdif計算では、365日の年と366日の年の両方が考慮されます。たとえば、n365が365日の年の開始日から終了日までの日数と等しく、n366が366日の年の開始日から終了日までの日数と等しい場合、yrdif計算は yrdif=n365/365. In summary, your job is to use the quality of life data to create the following. Rick Wicklin on November 16, 2016 1:02 pm. 3. set emp (keep=Manager_EMP_ID Employee_ID Salary); Then if you look at the data set option closely, it's a DROP. Re: Age from BirthDate! Posted 11-17-2015 01:39 PM (60884 views) | In reply to new_sas2015. 10. ' just like the below figure. Accessibility for Base. total_cohort_ person_years_age_1 = XX. Don't forget that the form of the date constant is always 'DDMONYYYY'd — '01JAN2005'd for example — regardless of the formats that you are using with your dates. explode (col) Returns a new row for each element in the given array or map. Posted 01-04-2021 05:26 PM (1057 views) | In reply to wheddingsjr. 8,2)=4, 将4. I am receiving the error: "Invalid character data" (Log below) Any help would be appreciated. Note I embedded the YRDIF function in the FLOOR function, assuming you want age as integers. c. etc, to age 99. Syntax: ageinyrs = YRDIF(birthdate, enddate, ' act/act '); ag_indays = DATDIF(birthdate, enddate, ' act/act ');If I have a dataset structure like this, how can I code to determine the rate = visits/person years? ID Total number of Visits Start Date End date 1 15 Jan21,2002 April4,2008 2 4 Feb6,1991 June8,2015 3 7 June9,1999 July5,2000七天搞定SAS(六):宏的编写、程序调错. The informats for these two dates are different. If the values of DischargeDTS look like " 2015-06-09 00:00:00. For example, DATE = DATEJUL(99001); assigns the SAS date value '01JAN99'D to DATE, and DATE = DATEJUL(1999365); assigns the SAS date value '31DEC1999'D to DATE. ); Example -. The variables current1 and current2 are assigned the current date using the date( )and today( ) functions. Makes no sense to do that. 4 DS2 Language Reference, Sixth Edition documentation. References. References. The age computation takes into account leap years. I’ve attempted the derivation using the following code but I’ve been unsuccessful. " YRDIF: Stata module to calculate daily date differences ," Statistical Software Components S458732, Boston College Department of Economics. You can use the following methods to round numbers in SAS: Method 1: Round to Nearest Integer. Various values in R are referred to as variables and are assigned using <- operator. “day” or “month”. new_num=input (character-variable, 4. e. 5) Post LOG results when you get errors. sas. Appendixes. sas. The CEIL function. The decimal difference is explained by the handling of the leap years, as the documentation states: 'ACT/ACT' uses the actual number of days between dates in calculating the number of years. The Quality of Life Form (QUL) was administered regularly to the patients enrolled in the National Interstitial Cystistis Data Base Study. EUCLID Function This will calculate the difference between two dates yielding the difference in years. If the argument's value is within 1E-12 of an integer, the function results in that integer. The age should calculate to be almost 330 years. total_cohort_person_years_age_0= XX. Here is a complete list of the pre-built SAS macro functions. I need to k. NOTE: Invalid argument to function YRDIF(. Tables of Perl Regular Expression (PRX) Metacharacters. data new_data; set original_data; new_value = round (value); run; . 4 Functions and CALL Routines Overview New and enhanced features enable you to perform the following tasks: n import and export macro variables n copy a record from one fileref to another n determine whether an argument is character or numeric (not available with the DATA step) n align numeric arguments with the CALL. X years total_cohort_ person_years_age_2 = XX. as. NOTE: Invalid second argument to function SUBSTR at line 26 column 9. A Complete Guide to Python DateTime Functions. The newly created variable new_x is in numeric format. You don't need to use input or put or whatnot; if it's a date formatted numeric, then: dob2 = dob; format dob2 mmddyy10. In-Database Technologies. YRDIF Function: Returns the difference in years between two dates. SAS Web Report Studio. 2 and latter having no format YRDIF(start_date, DATE_OF_DATA, 'act/act') Current version: 9. Metadata. 22:15 – Example: How to convert a character form of a time to a SAS Time value using the SAS. Auto-call macros, some of them are type 1 (macros), and some – type 2 (macro. X years. SAS. . ;To follow up on Reeza and Art, the person-year of exposure to ARV would be the difference between the start of ARV and the first stopping (you can do with with yrdif or the approximate formula " (stopdate-startdate)/365. sas. In the following code, we are adding seven days to 02 January 2017. 7677488 etc. ) 函数作用:sep是规定的分隔符,catx函数将字符数据前后拼接,中间分隔符相连。去除空格,且如有缺失值则不进行. SAS® Viya™ 3. " Since age is the difference in years between two dates (a birth date and some other date), the YRDIF. PROC SQL < option (s) >; ALTER TABLE table-name. If. diff_months_cont = intck ('month', mydate1, mydate2, 'C'); run; If you set the method argument equal to ‘C’ when you calculate the difference in months, SAS calculates the number of complete months between two dates. I understand there still is a discrepancy with the yrdif function but unless there are no other options with in. Note I embedded the YRDIF function in the FLOOR function, assuming you want age as integers. IDF¶ class pyspark. 七天搞定SAS(四):数据输出. In-Database Technology. I'm trying to calculate the difference in years between two dates using the YRDIF function and the following syntax: DATA want; SET have; Yrdif_test = YRDIF(Part_RDATE, BH_Accomplished_Date, "Actual"); RUN; I am getting an "invalid argument" warning and all the values are missing. This release contains updates for many of the third-party technologies that are used by the platform, including the Java runtime environment (JRE) and many of the third-party JAR files. SESUG 2019 Conference • Williamsburg, VA • October 20-22, 2019 ‹#›. PROC SQL; %DO k=1 %TO 50; CREATE TABLE NewTable&k. ) converts a Julian date () to a SAS date value. 0). Here are some real-world examples of how the INTCK function is used in SAS. Merge two given maps, key-wise into a single map using a function. Work in steps and keep the intermediate results, and delete those only when the space is needed later; SAS itself will take care. data new_data; set original_data; new_value = round (value); run; . ,19450,'AGE') at line 80 column 15. Use YRDIF Function. net dictionary. Go and check out all the styles for more fun! Urdif Name. com - Manuel pour le langage de programmation SAS. 04. Thus ROUND (x-50, 100) rounds x down to the nearest multiple of 100. Calculation of individual's age : The INTCK function is used to calculate the number of years between date of birth and today's date. CALERIE Phase 2 Data handling rules for RMR, TEE and AREE Residuals 4 The Mixed Procedure Model Information Data Set WORK. Manage Data Sort observations in a SAS data set. As would be generally appropriate, the YRDIF function does not include the last day of the interval (the date of the second argument) when counting the total number of days. informat for date. basis. 4 Step 3: Recode Data Type and Informats Data can be in different forms and the flat files may be generated by other software, e. ListenData offers free analytics and data science tutorials covering topics such as SAS, R, Python, Advanced Excel, VBA, SQL, Predictive ModelingExample: Using INTCK Function to Calculate Difference Between Dates in SAS. comComparisons. Regular type indicates the name of a component that is described in SQL Procedure Component Dictionary. Page 127. order_type)). Allen Buxton, 2020. 4 Functions and CALL Routines: Reference, Fifth Edition documentation. The INPUT Function is used to convert character variable to numeric. The age should calculate to be almost 330 years. Using YRDIF in Financial Applications The Basics. This page lists all possible intervals. This page is a complete repository of statistics tutorials which are useful for learning basic, intermediate, advanced Statistics and machine learning algorithms with SAS, R and Python. Each line of data contains three dates, the first two in the form mm/dd/yyyy descenders and the last in the form ddmmmyyyy. If the value of basis is AGE, then YRDIF computes the age. uses the actual number of days between dates in calculating the number of years. The YRDIF function can be used in calculating interest for fixed income securities when the third argument, basis, is present. Dictionary of SAS Functions and CALL Routines. CustDOB) format date09. Yes. C) The two data sets must contain a common variable. ) returns the year from a SAS date value (. The YRDIF function can be used in calculating interest for fixed income securities when the third argument, basis, is present. e. uscars; /**set with multiple data sets works the same as before**/ end; enddata; run; quit; proc ds2; data CarsBuild2(overwrite=yes); method run(); merge ds2how. The SAS code is as follows: Data Null;Both dif and yrdif _func give the same result up to 6 digits after the comma in the example above. 25 methods give similar results for decimal ages, but YRDIF is more accurate. 1 関数とCALLルーチン: リファレンス documentation. 注意: 可以看到,length year month day $10;虽然规定了year month day的长度,但cats将多余的空格去掉了;而对于缺失的数据,仍然进行了拼接; catx函数 函数结构:catx(sep,str1, str2, str3,. DATA Step Programming for CAS. 9. Calculating a Person’s Age using YRDIF function. data=studypop; set=b; This can't be correct. comWhat's New in SAS 9. SAS Forecasting and Econometrics. Reply. SAS Data Quality. 標準の証券計算方法の詳細については. Matplotlib Tutorial : Learn by Examples. In a DATA step, if the LEFT function returns a value to a variable that has not previously been assigned a length, then that variable is given the length of the argument. ; %END; QUIT; %mend; %sqlloop; [/pre] If you data are BIG, this will not be an efficient method as it will read the data 50 times - perhaps apply an index on MyDataSet on the variable MyVar to boot performance. Definition of yadirF in the Definitions. From SAS ®. sas. SAS Interface to Application Response Measurement (ARM). The first two arguments, start-date and end-date , are required. Handle: RePEc:boc:bocode:s458732. . Contains up to 256 characters. 11504. Usage Note 3036: YRDIF function returns unexpected results with partial leap year. txt header in picture. I think the yrdif function still gets me closer to the figure I need. Loops in Python explained with examples. SAS stores dates as numbers in numerical variables. The YRDIF function requires three arguments: the starting date of an interval; the ending date of an interval; the method to be used to calculate the interval. Computing ages with YRDIF The SAS Help and Documentation states that the YRDIF function "Returns the difference in years between two dates. CV Function: Returns the coefficient of variation. The YRDIF function can compute a person’s age. INTNX ( interval, from, n < , alignment >) ; o interval - interval name eg: 'MONTH', 'DAY', 'YEAR‘ , etc o from - a SAS date value (for date intervals) or datetime. com. Table of Contents Syntax. 4 DATA Step Statements: Reference. To calculate a person’s age, enter the start date and end date arguments followed by a. Create a new variable that is only the substr function, what you're using in the input () function. Since age is the difference in years between two dates (a birth date and some other date), the YRDIF function has been used to compute ages in this way: age = INT(YRDIF(birth. To know the interval between two dates in Years: data _null_;The SAS INTCK Function: Syntax. Should be 4. INPUT converts characters to a number, PUT converts a number to characters. Again, the YRDIF (Yrdif_fcn) function and 3 age formulas were programmed: the “standard calculation” (Std_age_calc); the adjusted calculation using the FLOOR function (Adj_form1); and the adjusted calculation using the INTCK function alone (Adj_form2). I have added answers to exercise sums (chapters 7 to 15 - even number problems) for Ron Cody's Learning SAS by Example Programmer's Guide. In the following example, YRDIF returns the difference in years between two dates based on each of the options for basis. also I find the data stored the numaric missing as blnk not as . The variables. . The month difference should be closer to 12. In this section, we'll get a quick and broad overview of the fundamental things you need to know about working with dates in SAS. Second, I would like to derive age from the stated variable based on today’s date. If the value of argument is positive, the INT function has the same result as the FLOOR function. Below is a list of some examples in which we have demonstrated the INTNX function in SAS. The YRDIF function can be used in calculating interest for fixed income securities when the third argument, basis, is. V45B Dependent Variable teerq Covariance Structure Unstructured Subject Effect subjno Estimation Method REML Residual Variance Method None Fixed Effects SE Method Model-Based Degrees of Freedom Method. No other values for basis are val. Anniv = intnx ('year', '30APR1789'd, 7, 'same'); returns the 7th anniversary of the date 30APR1789. Note: This module should be installed from within Stata by typing "ssc install yrdif". Topics include hypothesis testing, linear regression. c. YEARFRAC calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date). 基本; act/act基準を使用する計算; 人の年齢の計算; 会計アプリケーションでのyrdifの使用 基本. Functions and CALL Routines. That's why I came up with the macro. There is also an article in SAS blog discussing this. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. SubscriberKey, Datepart(t1. X years. STEP1-1. sas. informat. The INTNX function returns the SAS date value for the beginning date, time, or datetime value of the interval that you specify in the start–from argument. will . 実際の日数を含む月と年を計算に使用できます。. To calculate this value, use the YRDIF function. One is AGE_ACTUAL, which is the exact age from DOB to January. With the YRDIF function, you can also calculate a person’s age. DATDIF and YRDIF FunctionsDATDIF and YRDIF Functions calculates the difference in days and years between two SAS dates , respectively. There should only be 1 observation per person, which includes the most recent visit. 136. “day” or “month”. The start_date is the first argument, so select “Date 1” as the cell reference, A2 cell. SAS Customer Recognition Awards. docx from BA 658 at Bellevue University. please, in this case (and in all cases in the future), if there is a problem in the log, show us the ENTIRE log for this segment of code, every single line in the log for this segment of code, so we can see the code as it appears in the log, along. The Clinical Data Interchange Standards Consortium (CDISC) is an open, non-profit organization that develops and supports global data standards to improve the quality and interoperability of medical research and healthcare. 10. National Language Support (NLS) SAS Viya Logging: Configuration and Reference. Suppose we have the following dataset in SAS that contains two date variables: We can use the following code to calculate the difference between the values in the start_date and end_date variables in days, weeks, months, quarters and years: The five new. ) I write this program but it does not work data ageyear;YRDIF Function. It counts 29FEB birthdays on 28FEB instead of on 01MAR in non leap years. S458732 YRDIF: Stata module to calculate daily date differences by Allen Buxton S458731 KMEST: Stata module to compute Kaplan-Meier survival probabilities as estimation. order_type. Missing if either date is missing. 健保資料庫【系列5-5】計算 (年齡+日期)、轉換變數及健康資料常用的統計檢定、圖表. Also the very useful Base SAS date functions such as intck and yrdif are not available. Dictionary of SAS Statement Environment Variables. In seventh chapter i gathered knowledge about using conditional statements such as IF, ELSE IF, WHERE, SELECT , sub-setting with the help of the above statements and using. You either need to include this information in your connection definition or in your SQL. To get a true difference in years, use the word ACTUAL in quotes as shown in the example. When i open the data. I have one variable called date_of_birth that is a numeric value with default length 8. sql. 0 Likes 5 REPLIES 5. It should be dt_death - dt_birth if dt_death is present or otherwise it should be today's date- dt_death. SELECT * FROM MyDataSet WHERE MyVar=&k. Using either the DATDIF() or YRDIF() functions with datetime values as the arguments to the function might cause aD) data directory; set faculty; run; B) data directory; set faculty staff; run; What must be true before two data sets can be merged in SAS using a by statement? A) The two data sets must be in the same library. 136. 25 as divider is actually a pretty good option. 七天搞定SAS(一. 99. sas. I have checked for yrdif, datdif and intnx but none of them seems to fit my data. For an adult study, all of these approaches in calculating Age seem to be ok. Method 2: Round to Specific Decimal Places. R variables are similar to macroI am struggling to understand why a function with the same start and end dates is returning different values? YEARS_ON_JOB_c and YEARS2 have the same definition, the first being formatted as 10. 25. The same issue didn't happen to any other Dec 31st children for any of the other years in my. The book's friendly, easy-to-read style gently introduces readers to the most commonly used features of the SAS language. YRDIF returns the difference between two dates according to. txt"Study with Quizlet and memorize flashcards containing terms like Select the proper syntax to perform the following instructions: Specify the proper syntax for the MDY function to create a SAS value detailing how many days since Jan/01/1960. Apache Hadoop is one of the earliest and most influential open-source tools for storing and processing the massive amount of readily-available digital data that has accumulated with the rise of the World Wide Web. Is the logic below correct?2 Incidence Rate (IR) Prevalence Rate (PR) A measure of new cases of disease in a defined population over a specified period of time. If the value of basis is AGE, then YRDIF computes the age. In this lesson, we will investigate various aspects of processing dates and times within the SAS System. For example, in an datastep if I have a SAS variable defined as: AGE = YRDIF( birthdate, today(), 'ACTUAL'); but for some reason in my data the birthdate is missin. Auto-call macro functions. Operating Environments. On the other hand, it might not hurt to see the review of the YRDIF function, among other things. Here's my code! When I run the code, I'm not getting any errors or results. However I cannot explain it. 0. SAS Customer Recognition Awards (2023) SAS Community Library. Jonathan Duggins, NC State University. dates; input Subj $ DOB: ddmmyy10. . Expected output would be. Run PROC CONTENTS on your source datasets so you can see how the variables are defined. 4 DS2 Language Reference, Sixth Edition documentation. Now in its fourth edition, The Little SAS Book is a classic, helping many people learn SAS programming. Description. ; run;The only way I can get the YRDIF function to work is if I input the variables using the yymmdd8. ; PROC SQL; CREATE TABLE WORK. The DATDIF function has a specific meaning in the securities industry, and the method of calculation is not the same as the actual day count method. SAS Customer Recognition Awards. (333) In Stock. ; start-date: a. Could someone tell me an equivalent SAS function for the EXCEL function iferror(), which I could use in a PROC SQL variable assignment. 1. Instead of doing it this way, you could treat your variable as a character variable at first (since you know some of the values are not real dates anyway), then use the macro provided by AFHood to help you find the invalid values, then fix those values, then convert the variable to a numeric var once all the data are clean. There are 31 days in March, therefore Days_in_Month = 31. If the date represented in the second argument is to be included in the interval an extra day should be added. What does yadirF mean? Information and translations of yadirF in the most comprehensive dictionary. The total payment for the Constant Payment Mortgage is 3,670,206. . InRecentVisit=1 Incontact=1 Indemog=1 Inndi=1 SSN=XXXXXXX VisitDt=02APR2013 HtIn=67 WtLb=159 SBP=159 DBP=65 Inits=TRB City=Provo. opr_time,'order_type',d. user_id,max(named_struct('opr_time',d. CSS Function: Returns the corrected sum of squares. Here, your characters are like MMDDYY10. 6 than 13. The INT function returns the integer portion of the argument (truncates the decimal portion). Visit the SAS documentation for the YRDIF function to learn about other values for. H…You can't insert a PROC FREQ in the middle of a DATA step. Returns the difference in years between two dates according to specified day count conventions; returns a person’s age. Tenure of an employee with company : The INTCK function is used to find out the number of months between date of joining and today's date. In-Database Technologies. I'm working on exercise 12. That said, AGE is not very granular, particularly for infants, where the time lapse between age 0 and age 1 can be as much as two years. = YEARFRAC("Jan 1 2007","Mar 1 2007") Use four-digit years whenever possible, to avoid getting unexpected results. Study with Quizlet and memorize flashcards containing terms like Which of the following statements correctly computes Age in years at time of visit, given DOB (date of birth) and VisitDate?, Which date format should be specified to have the date variable appear in the following form: 15Mar2001, True/False: SAS converts all dates to equal the. comBut the difference is more than one year, so we will use the YEARFRAC function in the C2 cell to get the full difference of a year. 7677488. Whatʼs New. In YRDIF calculations that use the ACT/ACT basis, both a 365–day year and. Opal | Level 21. . Python Dictionary Comprehension with Examples. 8 A SAS function, YRDIF, is used to create new variables similar to those created in step #7. X years. You can round a number up, round it down, or round it to the nearest integer. I'm not sure what I did wrong. data temp; mydate = '02JAN2017'd; day=intnx ('day', mydate , 7); format mydate day date9. CASL Programmer’s Guide. Anniv = intnx ('year', '30APR1789'd, 7, 'same'); returns the 7th anniversary of the date 30APR1789. It might be better to use either the YRDIF age with some decimal places preserved, or to count age. SAS Customer Recognition Awards (2023) SAS Community Library.