I want records from table which stores the current date when a record is inserted with in current week only.
I have tried:
SELECT PId ,WorkDate ,Ho
datepart(dw, getdate()) is the current day of the week, dateadd(day, 1-datepart(dw, getdate()), getdate()) should be the first day of the week, add 7 to it to get the last day of the week
datepart(dw, getdate())
dateadd(day, 1-datepart(dw, getdate()), getdate())