Subscribe to Code Snippets
This whole Thing can be written in one line and here it is:
SELECT DAY(DATEADD(d, -DAY(DATEADD(m,1,GETDATE())),DATEADD(m,1,GETDATE())))
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend