pls help in sql query to find out whose birthday coming in within 3 days, means today, tomorrow and day after tomorrow.
like today date is 29/04/2022 and dateof birth is 01/05/2022.
DOB format is dd/MM/yyyy
Use Where condition as below.
SELECT [EmployeeId], [FirstName], [LastName] FROM Employees AS DaysDifference WHERE DATEDIFF(DAY, CAST('04/29/2022' AS DATE), CAST('05/01/2022' AS DATE)) BETWEEN 1 AND 3
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.