日期:2014-05-17  浏览次数:20854 次

关于计算时间加的问题上贴以结jingxiaoping 哥还在吗!谢谢~
<%
sj= "2007-3-27   15:30:31 "
sj=dateadd(m,3,dateadd(s,3, "&sj& "))
lanmu=request( "lanmu ")
info=(trim(request( "info ")))
telephone=(trim(request( "telephone ")))
set   rs=server.CreateObject( "adodb.recordset ")
rs.open( "select   *   from   message "),conn,1,3
rs.addnew
rs( "neirong ")=info
rs( "date ")=sj
rs( "stype ")=0
rs( "lanmu ")=lanmu
rs( "shenhe ")=1
rs( "sip ")=   Cstr(Request.ServerVariables( "LOCAL_ADDR "))
rs( "telephone ")=telephone
rs.update
rs.close
set   rs=nothing
%>
--
sj=dateadd(m,3,dateadd(s,3, "&sj& "))
这样写行吗~然后在添加帮看看~谢谢那里错了可以帮指出来吗。我想就是时间的问题~呵~多谢了。

------解决方案--------------------
<%
sj= "2007-03-27 15:30:31 "
sj=cdate(sj)
sj=dateadd( "s ",3,sj)
sj=dateadd( "n ",3,sj)
response.write sj
%>