Find last sunday
sql, sql-server, sql-server-2000, t-sql
Solution
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.
Problem
How will you find last sunday of a month in sql 2000?