.Net Info
Monday, August 1, 2011
How can I get the date of Last Monday of specified week?
declare @dt datetime
set @dt=’1/1/2010′ –Want to know January’s Last Monday Date
SELECT dateadd(d,-datepart(dw,DATEADD(d, -datepart(d,dateadd(mm,1,@dt)),dateadd(mm,1,@dt))-1)+1,DATEADD(d, -datepart(d,dateadd(mm,1,@dt)),dateadd(mm,1,@dt)))
1 comment:
Anonymous
May 23, 2014 at 10:11 PM
excellent site
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
excellent site
ReplyDelete