string sql="select * from table1 where Datepart(y,thedate) = "+dropdownlist1.selectedvalue+" and Datepart(m,thedate)="+dropdownlist2.selectedvalue;
Month(****)>"+myMonth+" and Year(****)>"+myYear+"
补充说明:table1查询数据表,thedate查询的字段~~~
感谢各位,刚查了一下Datepart()函数,string sql="select * from table1 where Datepart(y,thedate) = "+dropdownlist1.selectedvalue+" and Datepart(m,thedate)="+dropdownlist2.selectedvalue;对上面的Datepart(m,thedate)看的还不是太明白,不好意思,太菜了!
Year(****)>"+myYear+"
Datepart(y,thedate) 是 年份