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.The following example calculates the number of quarters between each value in the PlanClosing field and each value in the ActualClosing field:The following example calculates the number of quarters from each value in the orderDate field to the end of the year:
|
|
Copyright Actuate Corporation 2012 |