Hi all,
I'm trying to determine the name and time that employees work on a certain day. So I'd like to see the employee name next to the hour of the day like this:
Name, TimeIn, TimeOut Yvonne, 11, 15
select c.name, datepart([hour], t.TimeIn) as TimeIn, datepart([hour], t.TimeOut) as TimeOut
--select c.name, t.timein, timeout from cashier c, timeclock t where t.cashierID = c.id and convert(varchar(10),t.DBTimeStamp,110) = '05-05-2008'
I have trouble with the date convert me thinks. Not too familiar with date format conversions in SQL Server.
Any suggestions?