2013-06-19 111 views

回答

3
SELECT * 
FROM dbo.YourTable 
WHERE dt >= DATEADD(DAY,-15,GETDATE()) 

如果你想了一整天,而不必擔心在部分時間:

SELECT * 
FROM dbo.YourTable 
WHERE dt >= DATEADD(DAY,-15,CAST(GETDATE() AS DATE))