Reputation: 6050
How can I get the Week Index like this
from SQL Server.
I have used this
SELECT DATENAME(W,GETDATE())
But this will return the name as "Friday"
Thanks..
Upvotes: 0
Views: 185
Reputation: 138990
set datefirst 7 select datepart(dw, getdate())-1
SET DATEFIRST
DATEPART
Upvotes: 2