-
Please Hepl Me!!
Hi Guy!
I'm the new fo ASP so Now I have The problem when I try to do My Code It allway to give me the message : " Type mismatch: 'Format' " I don't kwon why ! Please have me sovel the problem !
This is my Code :
SQL = "SELECT * FROM Orders Where OrderDate between '" & _
Format(Request.Form("from"),"dd/mm/yyyy") & "' and '" & _
Format(Request.Form("To"),"dd/mm/yyyy") & "'"
Thanks alot.
cuong
-
u cant do this in Asp unlike in VB Format(Request.Form("from"),"dd/mm/yyyy")...what I will suggest u is collect the varible from the form in mm/dd/yyyy pattern and then give the where condition........how I normally do in such circumstances for eg...........
I take three select field in form viz Date,Month and Year.....user will select and submit the form , which I collect in this manner......
temp=request.form("Month") & "/" & request.form("Day") & "/" & request.form("Year")
ok now the date is in mm/dd/yyyy format and now u can easily run ur query like this.....
SQL = "SELECT * FROM Orders Where OrderDate ='" & _
'" & temp & "' "