Hi,I need to find the date of monday of the week in sql server 2005.I am using this sql code to find it.set DATEFIRST 1select DATEADD(dd, 1 - DATEPART(dw, getdate()), getdate())
i am using this in UDF. it does not allow me to use set DATEFIRST 1. it is showing error.i tried this sql also.SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0)
my week should start from Monday to sunday.Any other option to find the monday of the week.regardsSoniya