oracle计算是否是同一周

函数已经解决跨年问题

select to_char(date'2016-12-31','iW') from dual;
select to_char(date'2017-01-01','iW') from dual;
select to_char(date'2017-01-02','iW') from dual; select trunc(date'2016-12-31', 'iw') from dual;
select trunc(date'2017-01-01', 'iw') from dual;
select trunc(date'2017-01-02', 'iw') from dual;

to_char(date,'w') 是本月第几周

还有个方法是取两个日期的下个周一,比较是否相同

next_day( sysdate, 'MONDAY') 
上一篇:Mean Average Precision(mAP),Precision,Recall,Accuracy,F1_score,PR曲线、ROC曲线,AUC值,决定系数R^2 的含义与计算


下一篇:webstorm2018.2.3激活