Jul 28, 2020 3:48 am
Dates are given here 01-Jan-2019 and 31-Dec-2019
1 Reply
Jul 28, 2020 10:48 am
Use the date between function to achieve this.
Select Name, DateOfBirth, CAST(DateOfBirth as Date) as [DatePart]
From Employees
Where CAST(DateOfBirth) Between '2019-01-01' AND '2019-12-31'