SyntaxFix
Write A Post
Hire A Developer
Questions
If you are looking for last month so try this,
SELECT FROM #emp WHERE DATEDIFF(MONTH,CREATEDDATE,GETDATE()) = 1
SELECT FROM #emp WHERE DATEDIFF(day,CREATEDDATE,GETDATE()) between 1 and 30