dim MySql as string=String.Format("select sdate1,sdate2,Title from Sess " + _ "where id_code={0} and between(sdate1," & dRdate1 & "," & dRdate2 & "), Request.Item("ID"))In the BETWEEN() function I've tried putting the variables in quotes, CTOD(), even tried #dRdate1# (most of the examples I could find are for Access). Also tried defining the variables as date instead of string. Also tried not using BETWEEN():
"where id_code={0} and sdate1 >= " & dRdate1 & " and sdate1 <=" & dRdate2, Request.Item("ID"))I'm probably making this a lot harder than it needs to be. Could someone point out how to get these dates to work? Any suggestions appreciated.