dim dRdate1 as DateTime = DateTime.Parse(Request.Item("d1")) dim dRdate2 as DateTime = DateTime.Parse(Request.Item("d2")) dim MySql as string = String.Format("select s.sdate1,s.sdate2,s.Location,c.cTitle,e.hours " & _ "from dtrSess s join dtrEnroll e on e.scode=s.scode join dtrCourse c on c.ccode=s.ccode " & _ "where e.id_code= {0} and between(s.sdate1,{1},{2})", Request.Item("ID"),dRdate1,dRdate2)If I display the contents of the MySql variable the where clause is
where e.id_code= 1043 and between(s.sdate1,7/23/2003 12:00:00 AM,7/23/2003 12:00:00 AM)In order to run that in VFP I have to delimit the datetimes:
between(s.sdate1, {7/23/2000 12:00:00 AM},{7/23/2005 12:00:00 AM})This works from the command window in VFP, but I haven't been able to figure out how to get this done in the VB script. I've tried various convoluted ways to concatenate the delimiters onto the date variables, but still coming up dry.