Access里面的时间比较怎么写?谢谢!在线等待!

littleyy 2003-10-05 10:24:58
SELECT *
FROM R1
where selldate
> Cdate(2003-1-1)
and
selldate
<
Cdate(2003-10-10)

不能得到结果。怎么错了
...全文
77 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovehwq21 2003-10-27
  • 打赏
  • 举报
回复
用这个吧
SELECT * FROM R1
where selldate> #Cdate('2003-1-1')# and selldate<#Cdate('2003-10-10')#
或者
SELECT * FROM R1
where selldate between #2003-1-1# and #2003-10-10#
最后的实现机制就是
where selldate> #2003-1-1# and selldate<#2003-10-10#
或者
where selldate between #2003-1-1# and #2003-10-10#

webdesigning 2003-10-27
  • 打赏
  • 举报
回复
举例:
sql="delete from table where write_time < #"&dat&"#"

时间比较需要加"#"
littleyy 2003-10-05
  • 打赏
  • 举报
回复
谢谢
孟子E章 2003-10-05
  • 打赏
  • 举报
回复
SELECT *
FROM R1
where selldate
> Cdate('2003-1-1')
and
selldate
<
Cdate('2003-10-10')

28,391

社区成员

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

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