How to Get the Last Day of the Previous Month?
This one works in SQL Server 2008 R2, will probably work on SQL Server 2008 too :

DECLARE @DSL [DATETIME]
SET @DSL = (SELECT DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, -1))
PRINT 'Declar variabila pentru ultima zi din luna anterioară.'
PRINT @DSL