Your second date is getting rounded off to midnight. This shows what is happening, select MyDate = convert(smalldatetime,'04/08/2005 23:59:59' )MyDate ------------------------------------------------------ 2005-04-09 00:00:00(1 row(s) affected)
You should change your query to use the less than operator. This is usually the best way to specify a date range in SQL Server. Also, you should code text dates in yyyy/mm/dd format, because it works with all SQL Server default date formats.select *from hoursworkedwhere empid in ('MH44318') and timein >= '2005/04/02 00:00:00' timein < '2005/04/09 00:00:00' CODO ERGO SUM