This will find the end of month for any date:
select EOM = dateadd(month,datediff(month,-1,getdate()),-1)
You can also use the F_END_OF_MONTH function on this link:
End Date of Time Period Functions
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64759
CODO ERGO SUM