日期问题 我想打印当天的报表数据sql上怎么写的select * from dd where ccrq=getdate单什么都不出来阿是不是日期的格式不对ccrq的格式是yyyy-mm-dd如果是请问怎么改 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from dd where ccrq= #"& format(getdate,"yyyy-mm-dd") &"# 你是sql server数据库吧,我记得,用这个sql语句:"select * from dd where ccrq='"& getdate & "'"如果是access则:"select * from dd where ccrq=#"& getdate & "#" 总是有人,把一个日期型变量试图连接到字符串,要知道,sql语句是字符串!用&连接的也只能是字符串。 我是在command中的属性用的slect * from dd where ccrq=getdate() 看你这样行不,select * from dd where datediff(yyyy,ccrq,getdate())=0 and datediff(mm,ccrq,getdate())=0 and datediff(dd,ccrq,getdate())试试看 !!!高分!!!求助(在线等) 如何打开或关闭windows声音?在线等 谁知道写INI文件的函数? BCD码文件转换为ASCII码问题 救命!!!!!!!!!!!!! 100分求助!如何将一个Form放到PictureBox中。 计算字符串在界面上的宽度 mousemove如何使用??? 一个关于如何实现模拟键盘的问题? zilong28提问:VB如何编写带有过期信息的许可证 我想编一个论坛自动发贴机,自动投票机,自动注册机——请高手指教(分不够可再加) 求救!小弟急需!!---怎么使用VB来访问两个服务器上的数据库中的某个表??
"select * from dd where ccrq='"& getdate & "'"
如果是access则:
"select * from dd where ccrq=#"& getdate & "#"
slect * from dd where ccrq=getdate()
select * from dd where datediff(yyyy,ccrq,getdate())=0 and datediff(mm,ccrq,getdate())=0 and datediff(dd,ccrq,getdate())
试试看