表里有一个时间的字段,记录为"1995-06-03 09:23:09",怎么样判断它的小时和分钟大于8:30???????? 1.用getdate(),datepart()函数做出你的参考时间,如@temp_time='2001 08:30'2.用datediff判断要判断的时间和参考时间的差别,如:datediff(mi,yourtime,temp_time) between 0 and 60 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 错了!@temp_time='2001/7/19 08:30' 还不对!datediff(mi,yourtime,@temp_time) between 0 and 60 datepart(HH,yourtime)>8 and datepart(MI,yourtime)>30 select to_char(sysdate,'hh:mm') from dual 就行了! 上面各位兄弟没有排除不在同一天的情况,试一下我的方法select * from yourtable where arrivetime>convert(varchar(10),getdate(),20)+' 08:30' select * from yourtable where (datepart(arrivetime,hh)*60+datepart(arrivetime,mi)) > (8*60+30) select * from test where (datepart(hh,date)*60 + datepart(mi,date)) > (8*60+30) 小弟问一个简单的问题:在ACCESS库中要比较时间SQL语句如何写????? sky_blue(蓝天) 的方法真是牛 请教一个sql的执行效率问题 推荐一篇关于SQL Server新技术的英文资料,翻译用 取字符串 一个关于怎么使用LEFT OUTER JOIN的问题 谁都可以打开SQL SERVER的企业管理器的吗? 请教各位,帮小弟看下这个语句的作用! 用DTS导入数据时,如何解决如下问题? 单表数据对比问题 SQL2005完整备份+事务日志备份 还原出错问题!(高手测试测试) 数据库历史操作查看 哪位高手帮帮我:我的程序报以下错误,请问是什么原因,数据库是sql server? 一个小菜问题,很困惑,请高手一定要帮我!
datediff(mi,yourtime,@temp_time) between 0 and 60
select * from yourtable where arrivetime>convert(varchar(10),getdate(),20)+' 08:30'
在ACCESS库中要比较时间SQL语句如何写?????