Put your date into a variable and use the variable in your query string like this:
<font class="small">Code:</font><hr /><pre>strQueryDate = "16-May-08"
strQueryString = "select * from x_tbindpvoiecv120100 where SSN=101052792 and ccode='CWE' and filen=100220 and PDate='" & strQueryDate & "'"</pre><hr />
Once you can do that, you can use anything you want for the date:
<font class="small">Code:</font><hr /><pre>If Day(Now) < 10
strDay = "0" & Day(Now)
strDay = cstr(Day(Now))
strMonth = MonthName(Month(Now), True)
If Year(Now)-2000 < 10
strYear = "0" & Year(Now)-2000
strYear = cstr(Year(Now)-2000)
strQueryDate = strDay & "-" & strMonth & "-" & strYear </pre><hr />
If I did that right, then strQueryDate should contain 09-Sep-09 (well, it will contain that today, but tomorrow it will be 10-Sep-09, etc.), just like the format in your database.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"