MONTH_DIFFERENCE2
Description
Calculates the month difference between the first date and the second date ignoring years.
For example:
MONTH_DIFFERENCE2 (15/06/1985, 17/07/1998) = 1
(the difference between June and July is 1)
MONTH_DIFFERENCE2 (15/06/1985, 14/05/1973) = 11
(the difference between June and May is 11)
The function can be useful, for example, when determining next anniversary of some event.
Syntax
MONTH_DIFFERENCE2 (date1, date2)
Parameters
Two attributes of the Date type or date constants or calculations producing a date
Returns
Number: the difference in months between the two dates, ignoring years.
Example
IF MONTH_DIFFERENCE2 (CURRENT_DATE, Client.DateOfBirth) = 3 THEN SEND ReminderEmail TO Client