DECLARE @date datetime;
Set @date = GETDATE ()
--Thinking, 1900-01-01 (Monday) plus (given a log of the month of 6th month and 1900-01-01 weeks) week
Why not choose number 7th? If it is number 7th, then 7 is exactly Sunday, the first Monday will be counted to 8th.
Why not choose number 5th? If number 5th is Saturday, Monday will be last month. Less than number 5th is the same as this reason.
Select DATEADD (Week,datediff (Week,0,dateadd day,6-datepart (Day, @date), @date)), 0) ' The first Monday ' of the Month
Select DATEADD (Week,datediff (Week,0,dateadd day,6-datepart (Day, @date), @date)), 7) ' The second Monday ' of the Month
Select DATEADD (Week,datediff (Week,0,dateadd day,6-datepart (Day, @date), @date)), 1) ' The first Tuesday ' of the Month
Select DATEADD (Week,datediff (Week,0,dateadd day,6-datepart (Day, @date), @date)), 8) ' The second Tuesday ' of the Month
Go