I have a table that contains the date and time that an employee came to work. the table is populated everyday, and the time a person came in varies daily. I want to create a query that will pass only the date, and I want it to return all the employees that came in on that day, regardless of what time it was. At the moment that field is of type DateTime.
Here is my query:
Select DISTINCT Emp.Name + ' '+ Emp.Surname As FullName, RC.ClockIn
FROM Emp Employees, ClockIns RC
WHERE Emp.Emp_Id = RC.Emp_ID AND RC.ClockIn = '2010/10/21'
At the moment, it displays no result, but there should be at least one record here. ClockIn is of type DateTime.