How to do this Birthdays in the next two weeks using Responsys MYSQL

83 Views Asked by At

I'm setting up a segment using SQL and I need to capture contacts that birthday will be 15 days from now.

SELECT   *
FROM     $A$
WHERE EXTRACT(month FROM BIRTHDATE) = EXTRACT(month FROM CURRENT_TIMESTAMP)
AND EXTRACT(day FROM BIRTHDATE) = EXTRACT(day FROM CURRENT_TIMESTAMP - 15)
0

There are 0 best solutions below