In SQL Server 2008 and newer you can cast the DateTime
to a Date
, which removes the time element.
WHERE Orders.OrderStatus="Shipped"
AND Orders.ShipDate >= (cast(GETDATE()-6 as date))
In SQL Server 2005 and below you can use:
WHERE Orders.OrderStatus="Shipped"
AND Orders.ShipDate >= DateAdd(Day, Datediff(Day,0, GetDate() -6), 0)