DAY_DIFFERENCE2
Description
Calculates the day difference between the first date and the second date ignoring years of the dates.
For example:
DAY_DIFFERENCE2 (15/06/1985, 17/06/1998) = 2
(the difference between 15 of June and 17 of June is 2)
DAY_DIFFERENCE2 (15/06/1985, 14/06/1973) = 364
(the difference between 15 of June and 14 of June is 364)
The function can be useful, for example, when determining next anniversary of some event.
Syntax
DAY_DIFFERENCE2 (date1, date2)
Parameters
Two attributes of the Date type or date constants or calculations producing a date
Returns
Number: the number of days from the first date to the second date, ignoring years
Example
IF DAY_DIFFERENCE2 (CURRENT_DATE, Client.DateOfBirth) = 2 THEN SEND GreetingEmail TO Client