The following should provide you with the last day of the current month in sql-server-2000:
SELECT DATEADD(second,-1,DATEADD(month, DATEDIFF(month,0,GETDATE())+1,0))
To find the last day of a month for a given month, try:
DECLARE @thisDate DATETIME SET @thisDate = '06/27/2011' SELECT DATEADD(second,-1,DATEADD(month, DATEDIFF(month,0,@thisDate)+1,0))
source share