I think you need to reverse the order that you do the dateadd DD and dateadd MM.
See what happens when the month is March:
select ADD_DD_FIRST =
dateadd(mm,1,dateadd(dd,-1,(convert(datetime,replace('01-' + 'Mar 05', ' ', '-')))))
select ADD_MM_FIRST =
DATEADD(dd,-1,dateadd(mm,1,convert(datetime,'01-'+'Mar 05')))
ADD_DD_FIRST
------------------------------------------------------
2005-03-28 00:00:00.000
(1 row(s) affected)
ADD_MM_FIRST
------------------------------------------------------
2005-03-31 00:00:00.000
(1 row(s) affected)
quote:
Originally posted by AndyB13
Try
SELECT DATEADD(mm,1,DATEADD(dd,-1,(CONVERT(datetime,REPLACE('01-' + 'Apr 05', ' ', '-')))))
Sorry cant get to the 31st though 
Beauty is in the eyes of the beerholder 