SyntaxFix
Write A Post
Hire A Developer
Questions
I've not seen this solution presented yet; this is my preference for its simpler readability:
select dateadd(month,-1,format(getutcdate(),'yyyy-MM-01'))