The number of years between date1 and date2. The function calculates the difference by subtracting the year number of date1 from the year number of date2. For example, if date1 is 1/1/08 and date2 is 12/31/08, DIFF_YEAR( ) returns 0. If date1 is 11/25/08 and date2 is 1/5/09, DIFF_YEAR( ) returns 1.The following example calculates the number of years between each value in the HireDate data field and each value in the TerminationDate data field:The following example calculates the number of years from each value in the HireDate data field to the current date. TODAY( ) is a function that returns the current date.
|
|
Copyright Actuate Corporation 2012 |