Using Actuate BIRT Viewers : Functions and operators : DIFF_MONTH( )
 
DIFF_MONTH( )
Calculates the number of months between two date values.
Syntax
DIFF_MONTH(date1,date2)
Arguments
date1
The first date or date expression to use in the calculation.
date2
The second date or date expression to use in the calculation.
Returns
The number of months between date1 and date2. The function calculates the difference by subtracting the month number of date1 from the month number of date2. For example, if date1 is 8/1/08 and date2 is 8/31/08, DIFF_MONTH( ) returns 0. If date1 is 8/25/08 and date2 is 9/5/08, DIFF_MONTH( ) returns 1.
Example
The following example calculates the number of months between each value in the askByDate data field and each value in the ShipByDate data field:
DIFF_MONTH([askByDate],[shipByDate])
The following example calculates the number of months from each value in the hireDate data field to the end of the year:
DIFF_MONTH([hireDate], "1/1/09")