{{tag>Function Function_List Date_And_Time}} ====== YEAR_DIFFERENCE ====== ===== Description ===== Calculates the calendar year difference between the two dates as an integer constant. Year difference between 31/12/2004 and 01/01/2005 is 1. ===== Syntax ===== ''YEAR_DIFFERENCE (date1, date2)'' Can be used in the condition of a [[:ref:a_f:a:find|FIND]] action. ===== Parameters ===== Two attributes of the Date type or date constants or calculations producing a date ===== Returns ===== **Number**: the calendar year difference between the two dates (31/12/2004 to 01/01/2005 is 1). ===== Example ===== IF YEAR_DIFFERENCE (Account.OpeningDate, Account.ClosingDate) = 5 THEN ... ===== Related ===== [[ref:a_f:f:af:full_years|FULL_YEARS]], [[ref:a_f:f:af:month_difference|MONTH_DIFFERENCE]], [[ref:a_f:f:af:day_difference|DAY_DIFFERENCE]], [[ref:a_f:f:af:age|AGE]]