datediff(week,zy_time,getdate())=0 //查询本周 datediff(month,zy_time,getdate())=0 //查询本月 本季:select * from table where datediff(qq,C_CALLTIME,getdate ...
本文主要向大家介绍了SQLServer数据库之SQL Server 获取本周,本月,本年等时间内记录,通过具体的内容向大家展现,希望对大家学习SQLServer数据库有所帮助。 datediff week,zy time,getdate 查询本周datediff month,zy time,getdate 查询本月本季:select fromtablewheredatediff qq,C CALL ...
2019-11-06 23:15 0 817 推荐指数:
datediff(week,zy_time,getdate())=0 //查询本周 datediff(month,zy_time,getdate())=0 //查询本月 本季:select * from table where datediff(qq,C_CALLTIME,getdate ...
datediff(week,zy_time,getdate())=0 //查询本周 datediff(month,zy_time,getdate())=0 //查询本月 本季:select * from table where datediff(qq,C_CALLTIME,getdate ...
本周:select * from table where datediff(week,C_CALLTIME,getdate())=0 --C_CALLTIME 为日期字段本月:select * from table where datediff(Month,C_CALLTIME ...
参数声明 1、查询本日开始、结束时间 2、查询本周开始、结束时间 3、查询本月开始时间、结束时间 4、查询本季度开始、结束时间 5、查询本年度开始时间、结束时间 ...
我把我CSDN写的 搬来博客园了。。 SELECT * FROM 表名 WHERE timestampdiff( ...
如我要取8月1号到8月30号之间的早上7点半到晚上八点半这段时间内的数据。 SELECT * FROM tableName AS tWHERE t.create_date BETWEEN '2017-08-01 07:30' AND '2017-08-30 20:30 ...