DIFF_QUARTER( )
Calculates the number of quarters between two date values.
Syntax
DIFF_QUARTER(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 quarters between date1 and date2. DIFF_QUARTER( ) calculates the difference by subtracting the quarter number of date1 from the quarter number of date2. For example, if date1 is 1/1/10 and date2 is 3/31/10, DIFF_QUARTER( ) returns 0 because both dates are in quarter 1. If date1 is 3/31/10 and date2 is 4/15/10, DIFF_QUARTER( ) returns 1 because date1 is in quarter 1 and date2 is in quarter 2.
Example
The following example calculates the number of quarters between each value in the PlanClosing field and each value in the ActualClosing field:
DIFF_QUARTER([PlanClosing],[ActualClosing])
The following example calculates the number of quarters from each value in the orderDate field to the end of the year:
DIFF_QUARTER([orderDate], "12/31/10")

Additional Links:

Copyright Actuate Corporation 2012