时间!!!!!!!!!???????????????????

rain886 2003-10-29 05:28:34

ACCESS数据库
jf_date为时间类型
.......
passdate=date()
sql="select * from jf where jf_date= #" & passdate &"#"
sql="select * from jf where jf_date= '#" & passdate &"#'"
sql="select * from jf where jf_date= " & passdate
sql="select * from jf where jf_date= #" & passdate &"#"
sql="select * from jf where jf_date= #" & cdate(passdate) &"#"

以上都出现错误,请指教!!!!
...全文
48 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
qhlkj 2003-10-29
  • 打赏
  • 举报
回复
sql="select * from jf where jf_date= getdate()
dh20156 2003-10-29
  • 打赏
  • 举报
回复
数据表sj,字段content(文本),sj(日期时间date()):
<%
passdate=date()
Set rs=conn.execute("Select * from sj where sj=#"&passdate&"#")
If Not rs.eof then
response.write rs("sj")&rs("content")
else
response.write "没有找到与今天匹配的数据!"
end if
rs.close
Set rs=Nothing
conn.close
set conn=Nothing %>
luluso 2003-10-29
  • 打赏
  • 举报
回复
不好意思。上面打错。
luluso 2003-10-29
  • 打赏
  • 举报
回复
sql="select * from jf where jf_date= #" & passdate &"#
soli8 2003-10-29
  • 打赏
  • 举报
回复
估计是两者的时间格式不匹配 ,没试过 帮你顶呀

28,390

社区成员

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

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