怎么才能让它按时间段搜索!!(帮帮忙)

这个可以搜索!但是不可以按指定的日期搜索!我想加一个这样的按指定的日期搜索,大家帮帮我!我不会弄!
~~~~~~~~~~~~~~~~~~~~~~
未修改过
~~~~~~~~~~~~~~~~~~~~~~
<table width="85%" height="23" border="0" align="right" cellpadding="0" cellspacing="0" id="table4">
<tr>
<td width="41%"><div align="right"><span class="STYLE1">预订搜索:</span></div></td>
<form action="ordersearch.asp">
<td width="32%"><input type="text" name="search2" class="goto">
<span class="STYLE1">搜索类型:</span></td>
<td width="14%"><select name="select" class="goto" id="select" size="1">
<option value="1">酒店名称</option>
<option value="2">客人姓名</option>
<option value="3">客人帐号</option>
</select></td>
<td width="6%"><input type="submit" name="Submit2" class="goto" value="搜索"></td>
<td width="7%"><div align="right">
<input type="button" name="Submit42" value="打 印" onClick="javascript:window.print()">
</div></td>
</form>
</tr>
</table>
~~~~~~~~~~~~~~~~~~~~~~
已经修改过
~~~~~~~~~~~~~~~~~~~~~~
<td width="12%">指定日期:<input type=text name=starttime size=15 onFocus="javascript:setday(this)" title="格式:xxxx/xx/xx或xxxx-xx-xx或xxxx xx xx" value="点击选择日期"></td><td width="20%">至<input name=deptime type=text id="deptime" title="格式:xxxx/xx/xx或xxxx-xx-xx或xxxx xx xx" onFocus="javascript:setday(this)" value="点击选择日期" size=15></td>

(这是选择时间代码!!)哪位大哥帮帮忙!

第1个回答  推荐于2020-12-05
if request("starttime ")?<>"" and request("deptime")<>"" then
sql=sql&" and datediff(d,时间字段,request("starttime"))>0 and datediff(d,时间字段,request("deptime"))<0"
end if本回答被提问者采纳
第2个回答  2007-01-31
按时间搜索得看 执行的SQL语句。。

请把ASP代码贴出来看看
第3个回答  2007-01-31
大哥,你提供的代码和“搜索”一点关系也没有!
第4个回答  2007-01-31
你提供的这些没用
相似回答