SELECT DATEADD(m, DATEDIFF(m, 0, GETDATE()), 0)
Set date to end day of the month:
SELECT EOMONTH(GETDATE())
Set date to last day of the previous month:
SELECT EOMONTH(GETDATE(), -1)
Remove milliseconds from datetime:
DECLARE @now DATETIME
SET @now = GETDATE()
SELECT @now
SELECT DATEADD(ms, -DATEPART(ms, @now), @now)