原文:sql語句獲取本周、本月、本年數據

本周:select from table where datediff week,C CALLTIME,getdate C CALLTIME 為日期字段本月:select from table where datediff Month,C CALLTIME,getdate C CALLTIME 為日期字段本季:select from table where datediff qq,C CALLTI ...

2018-02-07 12:11 0 1787 推薦指數:

查看詳情

sql語句獲取本周、上一周、本月數據

獲取數據 本周 select * from table1 where datediff(week,時間字段,getdate()) = 0 上周 select * from table1 where datediff(week,時間字段,getdate()) = 1 下周 select ...

Fri Jan 17 22:12:00 CST 2020 0 1724
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM