SQL Server 2005General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
SELECT DATEADD(DAY, DATEDIFF(DAY, 0, Col1), 0),
WHERE Col1 >= '20070915' AND Col1 < '20070925'
AND CONVERT(CHAR(8), Col1, 108) BETWEEN '11:30:00' AND '13:14:59'
GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, Col1), 0)