VBs---计算时间问题

magangnet 2003-09-13 07:05:05
是这样的,我想在一个指定时间后5分钟显示记录,并且以后都显示
我试用了
the_Date=Rs("sj")
new_Date=Now()
difMinute= datediff("m",the_Date,new_Date)
Response.Write difMinute
可是difMinute 的值是0??
记录和系统时间是不相等的
请教怎么才可以做到“在一个指定时间后5分钟显示记录,并且以后都显示记录
...全文
139 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
magangnet 2003-09-14
  • 打赏
  • 举报
回复
这个方法不是很理想,还是谢谢你:)
超级大笨狼 2003-09-13
  • 打赏
  • 举报
回复
只能在客户端计算时间延迟,服务器端不能延迟执行
可以在客户端计算时间n后定向到指定页面。
http://www.ymdg.com/link.htm
我做的游戏,里面用到进度条。相关代码:
<table width="600" height="20" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000066">
<tr>
<td width=0 bgcolor="#000066" bordercolor="#0099CC" id=myproc1 ></td>
<td width=600 bordercolor="#0099CC" id=myproc2></td>
</tr>
</table>
'1分钟进度
<SCRIPT LANGUAGE=vbscript>
<!--
eee
dim mytime
mytime=0
sub eee()
window.setTimeout "eee","100"
if mytime<6*10 then
mytime=mytime+1
myproc1.width =mytime
myproc2.width =600-mytime
else
window.location.href="数据页.asp"
end if
end sub
-->
</SCRIPT>


magangnet 2003-09-13
  • 打赏
  • 举报
回复
0.0035???是什么?
chinesun 2003-09-13
  • 打赏
  • 举报
回复
the_Date=cdate(rs("sj"))
new_date=Now()
difMinute= datediff("m",the_Date,new_Date)
Response.Write difMinute

______________
Access:
"select * from yourtable where sj<now()-0.0035"
SQL:
"select * from yourtable where sj<gatedate()-0.0035"

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧