As @BassamMehanni mentioned, you can cast as DATE in SQL Server 2008 onwards...
SELECT
*
FROM
yourTable
WHERE
dateField >= CAST(GetDate() - 6 AS DATE)
AND dateField < CAST(GetDate() + 1 AS DATE)
The second condition can actually be just GetDate(), but I'm showing this format as an example of Less Than DateX to avoid having to cast the dateField to a DATE as well, thus massively improving performance.
If you're on 2005 or under, you can use this...
SELECT
*
FROM
yourTable
WHERE
dateField >= DATEADD(DAY, DATEDIFF(DAY, 0, GetDate()) - 6, 0)
AND dateField < DATEADD(DAY, DATEDIFF(DAY, 0, GetDate()) + 1, 0)
This isn't rounding this is truncating...But I think that is what is being asked.
(To round add one and truncate...and that's not rounding either, that the ceiling, but
again most likely what you want. To really round add .5 (does that work?) and truncate.
It turns out you can add .5 to GetDate() and it works as expected.
-- Round Current time to midnight today or midnight tomorrow
SELECT Convert(DateTime, DATEDIFF(DAY, 0, GETDATE() + .5))
I did all my trials on SQL Server 2008, but I think these functions apply to 2005 as well.
--
-- SQL DATEDIFF getting midnight time parts
--
SELECT GETDATE() AS Now,
Convert(DateTime, DATEDIFF(DAY, 0, GETDATE())) AS MidnightToday,
Convert(DateTime, DATEDIFF(DAY, -1, GETDATE())) AS MidnightNextDay,
Convert(DateTime, DATEDIFF(DAY, 1, GETDATE())) AS MidnightYesterDay
go
Now MidnightToday MidnightNextDay MidnightYesterDay
-------------------- --------------------- --------------------- ---------------------
8/27/2014 4:30:22 PM 8/27/2014 12:00:00 AM 8/28/2014 12:00:00 AM 8/26/2014 12:00:00 AM