y=intnx('year','21oct2009'd,3,'mid')What is the value of y?
-
01jun2012
-
21jul2012
-
19175 - Numeric equivalent of the date 01jul2012
-
21oct2012
Reveal answer
Fill a bubble to check yourself
C
Correct answer
Explanation
The SAS intnx function advances dates by intervals. intnx('year', '21oct2009'd, 3, 'mid') adds 3 years using 'mid' alignment, landing on July 1, 2012, which has SAS date value 19175.
AI explanation
INTNX('year', '21oct2009'd, 3, 'mid') shifts the date forward by 3 year-intervals from 2009, landing in the year 2012, and the 'mid' alignment parameter positions the result at the midpoint of that yearly interval rather than at the start or end. For a full calendar year, the midpoint SAS computes is 01jul2012, whose underlying SAS numeric date value is 19175 (days since 01jan1960), matching the marked answer.