To get the last Friday of any date the query follows:
SELECT DATEADD(d,-1-(DATEPART(dw,GETDATE()) % 7),GETDATE())
How can I get the next friday?
I've updated this answer to a similar question which takes @@DATEFIRST into consideration:
@@DATEFIRST
EDIT/CORRECTION:
SELECT DATEADD(DAY, 13 - (@@DATEFIRST + (DATEPART(WEEKDAY,GETDATE()) %7)), GETDATE())
1.4m articles
1.4m replys
5 comments
57.0k users