I want to find the date of Monday of current week
declare @td datetime
set @td = CONVERT(datetime,'28-07-2013',105)
print @td
declare @dt datetime
set @dt = (SELECT DATEADD(wk, DATEDIFF(wk,0,@td), 0) MondayOfCurrentWeek)
print @dt
This is giving me correct result , only if i have giv the sunday date , its giving me wrong answer for example in above 28 is sunday of july week, so as per my need i should get 22 07 2013 but as by default sql server take Sunday as first day of week it giving me 29-07-2013
I have also tried
Set DateFirst 1
went through
dint help me,
i hope to get help here from the experts
Thank you