How will you find last sunday of a month in sql 2000?
SELECT DATEADD(day,DATEDIFF(day,'19000107',DATEADD(month,DATEDIFF(MONTH,0,GETDATE() /*YourValuehere*/),30))/7*7,'19000107')
Edit: A correct, final, working answer from my colleague.
2.1m questions
2.1m answers
60 comments
57.0k users