The number of quarters between date1 and date2. DIFF_QUARTER calculates the difference by subtracting the quarter number of the month in date1 from the quarter number of the month in date2. The first quarter consists of the first three months in a calendar year, the second quarter consists of the next three months, and so on. For example, if date1 is 8/1/08 and date2 is 10/31/08, DIFF_QUARTER( ) returns 1. If date1 is 7/25/08 and date2 is 09/5/08, DIFF_QUARTER( ) returns 0.The following example calculates the number of quarters between each value in the PlanClosing data field and each value in the ActualClosing data field:The following example calculates the number of quarters from each value in the orderDate data field to the end of the year:


Copyright Actuate Corporation 2012 