<select name="select">
<option value=""><- Select Month -></option>
<%
Dim i
For i = 0 To 4
%>
<option value="<%=Month(DateAdd("m",-i,Date))%>"><%=MonthName(Month(DateAdd("m",-i,Date)))%> - <%=Year(DateAdd("m",-i,Date))%></option>
<%
Next
%>
</select>
<select name="select">
<option value=""><- Select Month -></option>
<%
Dim d
For d = 0 To 4
%>
option value="<% m1=Month(DateAdd("m",-d,Date)) %><%m2=Year(DateAdd("m",-d,Date))%>">
<%=MonthName(Month(DateAdd("m",-d,Date)))%> - <%=Year(DateAdd("m",-d,Date))%>
</option>
<%
Next
%>
</select>
Code (ASP)
sql = " SELECT * FROM wguses WHERE MONTH(fill_date) = '"&m1&"' AND YEAR(fill_date) = '"& m2 &"' "