I am trying to figure out if a certain event happened within a few weeks of someone's birthday. The year doesn't matter; only the month and day.
For example, I want to know if the event (January 5) is within 4 weeks of the birthday (Dec 18).
In SQL, I have
SELECT ..... where abs(week(event)-week(birthday))<5
This works well if both the event and the birthday are between weeks 4 and 48 in the year.
How can I set up the query so that it works for the edge months?