How can i find the particular days
问题 I have the date value like this - 12/2011 or 11/2011 ( MM/yyyy ) I want to find the sundays on the particular month.... For Example, If i select the month 01/2012, The query should give the result like this 01 08 15 22 29 The above date are sunday. Expected Output for 01/2012 Month 01 08 15 22 29 How to make a query Need Query Help 回答1: With a little help of a number table ( master..spt_values ) declare @M varchar(7) set @M = '01/2012' declare @D datetime set @D = convert(datetime, '01/'+@M,