Monday, January 08, 2007

SQL Query to get records of Last 30 days

SELECT TOP 3 Id, Title, SubTitle, Place, CONVERT(varchar(15), Rdate, 106) AS Rdate, Content, Address, About, Comments FROM tbl_PressRelease WHERE (Rdate > DATEADD(day, - 30, GETDATE()))ORDER BY Id DESC

No comments: