Skip to content
Advertisement

How do I select birthdays in the next 30 Days

I have a table with birthdates and I want to select all the birthdays that will come in the next 30 days.

The situation is, that all the birthdays are written in the form off 1999-09-15 which means that even if I tried selecting the next 30 days, the birthdays wouldn’t show up because the year is 1999.

I am running Microsoft Server 2016.

Advertisement

Answer

To get the birthdate, we need to work only on the days and the months, not on the year. Thats why we cannot get Where date between 2 dates.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement