SyntaxFix
Write A Post
Hire A Developer
Questions
This works too:
SELECT DATEADD(DAY,(DATEPART(DAY,@mydate)-1)*(-1),@mydate) AS FirstOfMonth